wesm/pandas — Issue #713: pivot_table aggregate changes data type
Author: kieranholland
Created: 2012-01-30 10:23:55+00:00
State: open

IMHO the result should be integer type:

df = DataFrame({
'x':('a', 'b'),
'y':('A', 'B'),
'i':(1, 2),
})
pivot_table(df, rows='x', cols='y')
y A B
x
a 1.0 NaN
b NaN 2.0

Love pandas!