automl / amltk

A build-it-yourself AutoML Framework
https://automl.github.io/amltk/
BSD 3-Clause "New" or "Revised" License
68 stars 6 forks source link

fix(data): `reduce_int_span` with nullable dtypes #200

Closed eddiebergman closed 11 months ago

eddiebergman commented 11 months ago

Reference Issues/PRs

Fixes #134

What does this implement/fix? Explain your changes.

Extra check during reduce_int_span now calls out to pandas when dealing with a Series. Previously, the np.result_type would return a np.dtype which has no support for nullables, which are allowed by pandas, through something like "Int64"

https://pandas.pydata.org/docs/user_guide/integer_na.html

Minimal Example / How should this PR be tested?

See tests


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.