Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
johne13 opened this issue Jul 30, 2015 · 3 comments
Closed

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

johne13 opened this issue Jul 30, 2015 · 3 comments
Labels
Dtype Conversions Unexpected or buggy dtype conversions Duplicate Report Duplicate issue or pull request Enhancement Reshaping Concat, Merge/Join, Stack/Unstack, Explode

Comments

@johne13
Copy link

johne13 commented Jul 30, 2015

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)
@jreback jreback added Enhancement Reshaping Concat, Merge/Join, Stack/Unstack, Explode Difficulty Novice Dtype Conversions Unexpected or buggy dtype conversions labels Jul 30, 2015
@jreback jreback added this to the Next Major Release milestone Jul 30, 2015
@bwillers
Copy link
Contributor

bwillers commented Aug 8, 2015

Working on this now, hitting up against the fact that SparseDataFrame only supports floating point data... Shall we have it return uint8s for regular frames and float64s for sparse frames?

@Lunran
Copy link

Lunran commented Sep 10, 2017

Isn't this a duplicate of the following?

@jreback
Copy link
Contributor

jreback commented Sep 10, 2017

yep looks that way.

@jreback jreback closed this as completed Sep 10, 2017
@jreback jreback added the Duplicate Report Duplicate issue or pull request label Sep 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Duplicate Report Duplicate issue or pull request Enhancement Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

No branches or pull requests

4 participants