Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of new reshaping alteration "melt" #679

Open
Seddryck opened this issue Mar 20, 2022 · 0 comments
Open

Support of new reshaping alteration "melt" #679

Seddryck opened this issue Mar 20, 2022 · 0 comments
Milestone

Comments

@Seddryck
Copy link
Owner

Seddryck commented Mar 20, 2022

This alteration is useful to reshape a result-set into a format where one or more columns are identifier variables, while all other columns, considered measured variables, are “unpivoted” to the row axis, leaving just two non-identifier columns, ‘variable’ and ‘value’.

Attributes:

  • variable-identifier: Name to use for the ‘variable’ column. If not specified use ‘variable’.
  • value-identifier: Name to use for the ‘value’ column. If not specified use ‘value’.

Elements:

  • keys: Column(s) to use as identifier variables.
  • values: Column(s) to unpivot. If not specified, uses all columns that are not set as keys.

Original table

Fruit Price Stock
Apple 10 125
Peer 22 145
Orange 5 15

Alteration

<melt variable-identifier="[attrib.]">
   <keys>
      <column identifier="#0">
   </keys>
<melt />

Result table

Fruit attrib. value
Apple Price 10
Apple Qty 125
Peer Price 22
Peer Qty 145
Orange Price 5
Orange Qty 15
@Seddryck Seddryck added this to the v2.1 milestone Mar 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant