ENH: Allow different dtype
in pandas.Series.str.get_dummies
#47872
Labels
Enhancement
Performance
Memory or execution speed performance
Strings
String extension data type and string data
Milestone
Feature Type
Adding new functionality to pandas
Changing existing functionality in pandas
Removing existing functionality in pandas
Problem Description
For
pandas.Series.str.get_dummies
now it will only return data type ofnumpy.int64
. It would be nice if other data types can be specified.Feature Description
Add a new parameter to
str.get_dummies
Alternative Solutions
N/A
Additional Context
As
pandas.Series.str.get_dummies
is the easiest method in pandas to implement multi-encoding, it would be great if more data types are supported. The int64 used now can easily cause OOM problem in many cases. Indeed, it is this problem I came across that encouraged me to request this feature here.The text was updated successfully, but these errors were encountered: