pandas pivot with duplicate index/column pairs raises ValueError: Index contains duplicate entries, cannot reshape; pivot_table averages
@btw-aak▲ 5 net votes
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.