You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Applying convert_dtypes() to a column with dtype string converts it to a column dtype 'object' (and the individual values from str type to bytes type).
Applying convert_dtypes() to a column with dtype boolean converts it to a column dtype 'Int64' (and the individual values from bool type to int type).
Expected Output
convert_dtypes() should keep StringDtype columns as StringDtype and BooleanDtype columns as BooleanDtype.
Output of pd.show_versions()
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.8.1.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : English_Malaysia.1252
jorisvandenbossche
changed the title
convert_dtypes changes StringDtype to bytes, and BooleanDtype to Int64
BUG: convert_dtypes changes BooleanDtype to Int64
Feb 29, 2020
Uh oh!
There was an error while loading. Please reload this page.
Code Sample, a copy-pastable example if possible
Problem description
Applying convert_dtypes() to a column with dtype
string
converts it to a column dtype 'object' (and the individual values fromstr
type tobytes
type).Applying convert_dtypes() to a column with dtype
boolean
converts it to a column dtype 'Int64' (and the individual values frombool
type toint
type).Expected Output
convert_dtypes() should keep StringDtype columns as StringDtype and BooleanDtype columns as BooleanDtype.
Output of
pd.show_versions()
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.8.1.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : English_Malaysia.1252
pandas : 1.0.1
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.1
pip : 19.2.3
setuptools : 41.2.0
Cython : None
pytest : 5.3.5
hypothesis : None
sphinx : None
blosc : None
The text was updated successfully, but these errors were encountered: