-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
Closed
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsEnhancement
Milestone
Description
This would be consistent with other pandas methods.
The reason I'm running into it is having some NaNs scattered across some int and bool columns, which converts to float / objects. If I discard those NaNs, it would be nice to do
df = df.astype({'my_bool', 'bool', 'my_int': 'int'})
instead of
df['my_bool'] = df.my_bool.astype('bool')
df['my_int'] = df.my_int.astype('int')Metadata
Metadata
Assignees
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsEnhancement