scikit-learn-contrib / category_encoders

A library of sklearn compatible categorical variable encoders
http://contrib.scikit-learn.org/category_encoders/
BSD 3-Clause "New" or "Revised" License
2.41k stars 395 forks source link

convert pd.NA to np.nan #427

Closed tvdboom closed 1 year ago

tvdboom commented 1 year ago

Fixes #424

Proposed Changes

Treat pd.NA the same as np.nan, i.e., return nan when handle_missing="return_nan".

PaulWestenthanner commented 1 year ago

Looks good to me! thanks for that work. I just merged something else prior to your PR, which introduced some small conflicts. Would you please fix them so I can get it merged?

tvdboom commented 1 year ago

@PaulWestenthanner I added all commits from the other pr by accident to this one, but it should be fine. Can we merge?

PaulWestenthanner commented 1 year ago

@tvdboom sorry for taking a little while. I was confused that all the changes showed up again. But I just merged it locally and it seems fine to me. So I'll merge this