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

Pandas 8-bit nullable integer type not supported #8466

Closed
andreostrovsky opened this issue Nov 14, 2022 · 1 comment · Fixed by #8480
Closed

Pandas 8-bit nullable integer type not supported #8466

andreostrovsky opened this issue Nov 14, 2022 · 1 comment · Fixed by #8480

Comments

@andreostrovsky
Copy link

#7760 added support for Pandas nullable integer types. Yet it only added support for Int16, Int32, and Int64; not Int8. Is there a reason this was excluded?

Pandas has a commonly used function to reduce DataFrame size to_numeric(series, downcast='integer'), which reduces the specified series to the smallest nullable integer type that fits the data, including Int8.

Currently, users need to then explicitly convert Int8 columns to Int16 so as to avoid xgboost error DataFrame.dtypes for data must be int, float, bool or category. ...

Using:

  • xgboost 1.7.1
  • pandas 1.5.1
@trivialfis
Copy link
Member

At the time I just tried to implement support for whatever was listed by the pandas' doc about nullable type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants