-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: dtype compat with get_dummies #8725
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
Labels
Milestone
Comments
You didn't call pd.get_dummies(df['hour_cat']).dtypes
Out[12]:
0 float64
1 float64
2 float64
3 float64
4 float64
5 float64
6 float64
7 float64
8 float64
9 float64
# etc.
dtype: object |
sorry..that was a typo....but it has the same problem either way. |
avishaylivne
added a commit
to avishaylivne/pandas
that referenced
this issue
May 25, 2016
Make get_dummies() return columns of dtype=bool instead of np.float64 BUG: dtype compat with get_dummies pandas-dev#8725 pandas-dev#8725 Since all the point of this method is to return binary features there's no point to waste RAM and represent them using floats
TomAugspurger
added a commit
to TomAugspurger/pandas
that referenced
this issue
Sep 1, 2016
Closes pandas-dev#8725 Ensures that get_dummies on a DataFrame whose output is a mix of floats / ints & dummy-encoded columns doesn't coerce the dummy-encoded cols from uint8 to ints / floats.
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
from SO
I think should not coerce to floats but be an int (or a categorical)
The text was updated successfully, but these errors were encountered: