Skip to content

pivot_table aggregate changes data type #713

Closed
@kieranholland

Description

@kieranholland

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions