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
This happened after I upgraded to pyarrow 0.16.0, and UInt32 is the only dtype that I had trouble with.
The problem should be with read_parquet, I tried reading parquet with another package, and got the expected output.
Expected Output
col
0 <NA>
1 1
2 2
3 3
4 4
Output of pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.7.3.final.0
python-bits : 64
OS : Darwin
OS-release : 18.7.0
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
So it seems that "uint32" data cannot be stored in parquet, and they are rather stored as int64. When reading back in, pandas still assumes that the data is uint32 (without checking that is actually the case) and thus incorrectly interprets the int64 data as uint32.
jorisvandenbossche
changed the title
read_parquet unexpected output with pyarrow 0.16.0
BUG: read_parquet unexpected output with pyarrow 0.16.0 and nullable usigned int dtype
Feb 12, 2020
Problem description
The above cope prints:
This happened after I upgraded to
pyarrow 0.16.0
, andUInt32
is the only dtype that I had trouble with.The problem should be with
read_parquet
, I tried reading parquet with another package, and got the expected output.Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.7.3.final.0
python-bits : 64
OS : Darwin
OS-release : 18.7.0
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.1
numpy : 1.17.3
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 45.2.0.post20200210
Cython : None
pytest : 5.3.2
hypothesis : None
sphinx : 2.3.0
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.4.2
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : 7.11.1
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.4.2
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 0.16.0
pytables : None
pytest : 5.3.2
pyxlsb : None
s3fs : 0.4.0
scipy : 1.4.0
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : None
numba : 0.48.0
The text was updated successfully, but these errors were encountered: