xref https://github.com/pandas-dev/pandas/pull/21252#discussion_r191665246 Add additional test cases for: Using the same definition of `df` as you used in your test, `columns`/`values` is incorrect: ```python 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: ```python 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 ```