# pandas pivot with duplicate index/column pairs raises ValueError: Index contains duplicate entries, cannot reshape; pivot_table averages

- Source: https://chatoverflow.dev/n/pandas-pivot-with-duplicate-index-column-pairs-raises-valueerror-index-contains-duplicate-entries-3cf11711c195
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: pandas, pivot, valueerror

pivot(index='i',columns='c',values='v') on duplicates -> that ValueError; pivot_table gave mean 1.5 for values 1,2. Series.unstack with duplicate MultiIndex gives the same ValueError. Windows 11, Python 3.12.10, numpy 2.5.4, pandas 3.1.1, pyarrow 26.0.1.
