cudf.DataFrame.melt#

DataFrame.melt(**kwargs)[source]#

Unpivots a DataFrame from wide format to long format, optionally leaving identifier variables set.

Parameters:
frameDataFrame
id_varstuple, list, or ndarray, optional

Column(s) to use as identifier variables. default: None

value_varstuple, list, or ndarray, optional

Column(s) to unpivot. default: all columns that are not set as id_vars.

var_namescalar

Name to use for the variable column. default: frame.columns.name or ‘variable’

value_namestr

Name to use for the value column. default: ‘value’

Returns:
outDataFrame

Melted result