melt_dataframe
Unpivot wide data into long format for analysis. Keep identifier columns and melt value columns to reshape datasets, enabling compatibility with tools that require long-form data.
Instructions
Unpivot (wide to long format). id_vars are columns to keep, value_vars are columns to melt. Reverse of pivot. Use when data is in wide format but tools expect long format. Example: melt_dataframe(id_vars=["Name","City"], value_vars=["Score","Revenue"])
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| df_name | No | ||
| id_vars | Yes | ||
| var_name | No | variable | |
| value_name | No | value | |
| value_vars | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |