Explanation for `FutureWarning: is_categorical is deprecated and will be removed in a future version.`
PGijsbers opened this issue · 0 comments
PGijsbers commented
When using pandas>=1.1.0
you will encounter the following warning:
...\site-packages\category_encoders\utils.py:21:
FutureWarning: is_categorical is deprecated and will be removed in a future version.
Use is_categorical_dtype instead.
elif pd.api.types.is_categorical(cols):
this is due to the category_encoders
calling a function which is deprecated per pandas>=1.1.0
, and not caused by GAMA directly.
There is a PR with a fix for the category_encoders
package here.
Hopefully it will be integrated in a PyPI release soon.
Until then, to avoid the warnings you can either use pandas<1.1.0
or add the following lines of code (from this blog):
# import warnings filter
from warnings import simplefilter
# ignore all future warnings
simplefilter(action='ignore', category=FutureWarning)
Here are the related Python docs.