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
Fails with KeyError: Int64Dtype() in File [...]/pandas/_libs/parsers.pyx:1417, in pandas._libs.parsers._maybe_upcast(). (Also refer to full stacktrace below).
Pandas version checks
I have checked that this issue has not already been reported.
[ ] I have confirmed this bug exists on the latest version of pandas.use_nullable_dtypes
has been added by ENH: Add option to use nullable dtypes in read_csv #48776 .I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
Fails with
KeyError: Int64Dtype()
inFile [...]/pandas/_libs/parsers.pyx:1417, in pandas._libs.parsers._maybe_upcast()
. (Also refer to full stacktrace below).use_nullable_dtypes
works well withoutdtype="Int64"
.Without
use_nullable_dtypes
the coercion works, but there is a loss of precision (ie the diff is reported as 1792 instead of 2000 on my machine).Expected Behavior
Produces dataframe with:
Installed Versions
INSTALLED VERSIONS
commit : 2f7dce4
python : 3.10.6.final.0
python-bits : 64
OS : Darwin
OS-release : 21.6.0
Version : Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_GB.UTF-8
LOCALE : en_GB.UTF-8
pandas : 1.6.0.dev0+350.g2f7dce4e6e
numpy : 1.23.3
pytz : 2022.4
dateutil : 2.8.2
setuptools : 65.5.0
pip : 22.3
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : 8.5.0
pandas_datareader: None
bs4 : None
bottleneck : None
brotli : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : None
snappy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
zstandard : None
tzdata : None
The text was updated successfully, but these errors were encountered: