Reshape a dataset by transforming columns into rows.
Examples
sales
with columns for date
, product_id
, and sales_amount
,
we can use melt to transform this dataset into a long format.
This transformation will create a new dataset long_sales
where each row represents a single observation of sales amount for a product on a given date,
facilitating further analysis or visualization.The resulting dataset long_sales
will have the following columns:date
: the date of the observationvariable
: indicating the product by its product_id
value
: the sales amount for that product on the given dateds.first_name
), datasets (ds
or ds[["first_name", "last_name"]]
) or models (referenced
by name e.g. "churn-clf"
).
Inputs
Outputs
step(..., {"param": "value", ...}) -> (output)
.
Parameters
Array items
Examples
Array items
Examples