Skip to content
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

BUG: GroupBy float16 indexes are not supported #57564

Closed
3 tasks done
BohdanBilonoh opened this issue Feb 22, 2024 · 2 comments
Closed
3 tasks done

BUG: GroupBy float16 indexes are not supported #57564

BohdanBilonoh opened this issue Feb 22, 2024 · 2 comments
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@BohdanBilonoh
Copy link

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

import pandas as pd
import numpy as np

df = pd.DataFrame({
    "column1": np.array([0.1, 0.1, 0.1, 0.2, 0.2, 0.2], dtype=np.float16),
    "column2": [1,2,3,4,5,6]
})

df.groupby("column1").groups

Issue Description

GroupBy fails with float16 key type

Expected Behavior

GroupBy should support float16 key dtype

Installed Versions

INSTALLED VERSIONS

commit : fc37c83
python : 3.11.8.final.0
python-bits : 64
OS : Linux
OS-release : 5.15.0-94-generic
Version : #104~20.04.1-Ubuntu SMP Tue Jan 16 13:34:09 UTC 2024
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : en_US.UTF-8
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8

pandas : 3.0.0.dev0+407.gfc37c83c2d
numpy : 1.26.4
pytz : 2024.1
dateutil : 2.8.2
setuptools : 69.1.0
pip : 24.0
Cython : 3.0.0
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.21.0
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : None
bottleneck : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pyarrow : 15.0.0
pyreadstat : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2024.1
qtpy : None
pyqt5 : None

@BohdanBilonoh BohdanBilonoh added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Feb 22, 2024
@phofl
Copy link
Member

phofl commented Feb 22, 2024

float16 is not supported In pandas, you'll have a bad time using it

@phofl phofl closed this as completed Feb 22, 2024
@BohdanBilonoh
Copy link
Author

Thank you for clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

2 participants