Closed
Description
Problem description
Currently DataFrame.pivot
accepts either None
or a column name for the option values
but not a list of column names.
# this works
df.pivot(values = None)
df.pivot(values = 'column_name')
# this doesn't work
df.pivot(values = ['cn1', 'cn2'])
It is not convenient if I want to create a pivot table for multiple columns at the same time. Of course, we can pass None
to values
and then select columns we want to. But this is not as convenient.