Skip to content

BUG: Parquet format does not support saving float16 columns #44846

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

Closed
3 tasks done
Anirudhsekar96 opened this issue Dec 10, 2021 · 1 comment
Closed
3 tasks done

BUG: Parquet format does not support saving float16 columns #44846

Anirudhsekar96 opened this issue Dec 10, 2021 · 1 comment
Labels
Bug IO Parquet parquet, feather
Milestone

Comments

@Anirudhsekar96
Copy link
Contributor

  • 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 master branch of pandas.

Reproducible Example

import pandas as pd
import numpy as np

data = np.arange(2, 10, dtype=np.float16)
df = pd.DataFrame(data=data, columns=['fp16'])
df.to_parquet('./fp16.parquet')

Issue Description

Pandas does not validate presence of float16 columns in DataFrame as parquet format does not support saving float 16 values.

Additional references:

Expected Behavior

Raise ValueError while validating DataFrame before saving.

Installed Versions

INSTALLED VERSIONS

commit : b7991da
python : 3.8.12.final.0
python-bits : 64
OS : Linux
OS-release : 5.11.0-41-generic
Version : #45~20.04.1-Ubuntu SMP Wed Nov 10 10:20:10 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8

pandas : 1.4.0.dev0+1356.gb7991da361.dirty
numpy : 1.21.4
pytz : 2021.3
dateutil : 2.8.2
pip : 21.3.1
setuptools : 59.4.0
Cython : 0.29.25
pytest : 6.2.5
hypothesis : 6.31.3
sphinx : 4.3.1
blosc : None
feather : None
xlsxwriter : 3.0.2
lxml.etree : 4.6.4
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 3.0.3
IPython : 7.30.1
pandas_datareader: None
bs4 : 4.10.0
bottleneck : 1.3.2
fsspec : 2021.11.0
fastparquet : 0.7.2
gcsfs : 2021.11.0
matplotlib : 3.5.0
numexpr : 2.8.0
odfpy : None
openpyxl : 3.0.9
pandas_gbq : None
pyarrow : 6.0.1
pyxlsb : None
s3fs : 2021.11.0
scipy : 1.7.3
sqlalchemy : 1.4.28
tables : 3.6.1
tabulate : 0.8.9
xarray : 0.18.2
xlrd : 2.0.1
xlwt : 1.3.0
numba : 0.53.1

@Anirudhsekar96 Anirudhsekar96 added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 10, 2021
@jreback jreback added this to the 1.4 milestone Dec 14, 2021
@jreback jreback added IO Parquet parquet, feather and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 14, 2021
@Anirudhsekar96
Copy link
Contributor Author

Opened a new bug report because the issue is also observed in other dtypes unsupported by pyarrow.

#44914

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IO Parquet parquet, feather
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants