Skip to content

Output from get_dummies() should default to np.int8 #10708

Closed
@johne13

Description

@johne13

The output columns from get_dummies() are binary by nature, changing this default from float64 to int8 would save 7 bytes per dummy.

df=pd.DataFrame({ 'x':[1,2,3] })
pd.get_dummies(df.x)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Dtype ConversionsUnexpected or buggy dtype conversionsDuplicate ReportDuplicate issue or pull requestEnhancementReshapingConcat, Merge/Join, Stack/Unstack, Explode

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions