-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: read_csv with engine='pyarrow' doesn't respect na_values unless entire column has na values #52946
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
Comments
Hi, thanks for your report. This is fixed on main, but might need a test, not sure. cc @lithomas1 |
I would like to work on this. |
No arrow label? It doesn't reproduce without using the pyarrow backend. Even if it's fixed on main, I guess it's good that the issue would be documented for versions 2.0.0 and 2.0.1. |
We don't document bugs |
Hey , I want to work on this issue |
I think this has been fixed by me in #52087, and it should be tested, so I'm going to close this. @natmokval @anshuman0123 (Just a warning, though: Some may be easier than others, and others are unfixable due to missing features in Pyarrow). You can also try filtering by the "Arrow" and "IO CSV" labels to find more similar issues. |
I didn't mean to imply any extra work is needed from anybody. I'm happy that this is fixed in main. I meant it is now documented in this issue. Sorry.
I see bugs documented in the whatnew files. |
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.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
When using
read_csv
withengine='pyarrow'
,na_values
is not respected unless the whole column has NA values.This does not reproduce without the
engine='pyarrow'
argument.Expected Behavior
na_values
should always be respected.Installed Versions
INSTALLED VERSIONS
commit : 37ea63d
python : 3.11.1.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19043
machine : AMD64
processor : Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : Hebrew_Israel.1255
pandas : 2.0.1
numpy : 1.24.3
pytz : 2023.3
dateutil : 2.8.2
setuptools : 65.7.0
pip : 22.3.1
Cython : None
pytest : 7.3.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.12.0
pandas_datareader: None
bs4 : 4.12.2
bottleneck : None
brotli : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : 3.1.2
pandas_gbq : None
pyarrow : 11.0.0
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : None
snappy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2023.3
qtpy : 2.3.1
pyqt5 : None
The text was updated successfully, but these errors were encountered: