Closed
Description
xref #21252 (comment)
Add additional test cases for:
Using the same definition of df
as you used in your test, columns
/values
is incorrect:
In [3]: pd.__version__
Out[3]: '0.23.0'
In [4]: df.pivot_table(columns='A', values='B')
Out[4]:
A NaN low
B 2.0 3.0
Similarly index
/columns
/values
is incorrect:
In [5]: df['AA'] = df['A']
In [6]: df.pivot_table(index='A', columns='AA', values='B')
Out[6]:
AA NaN low
A
NaN 2.0 NaN
low NaN 3.0