We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the UniformEncoder, replacing NaN raises the following FutureWarning sometimes:
UniformEncoder
FutureWarning
FutureWarning: The behavior of Series.replace (and DataFrame.replace) with CategoricalDtype is deprecated. In a future version, replace will only be used for cases that preserve the categories. To change the categories, use ser.cat.rename_categories instead.
It gets raised here:
RDT/rdt/transformers/categorical.py
Line 200 in ecf7499
A fix here would be to use ser.cat.remove_categories()
ser.cat.remove_categories()
from rdt.transformers import UniformEncoder intervals = { ' United-States': [0.0, 0.8], None: [0.8, 0.9],' Jamaica': [0.9, 0.99] } data = pd.Series([0.107995, 0.148025, 0.632702], name='native-country', dtype=float) transformer = UniformEncoder() transformer.intervals = intervals transformer.dtype = 'O' transformer._reverse_transform(data)
The text was updated successfully, but these errors were encountered:
R-Palazzo
Successfully merging a pull request may close this issue.
Environment Details
Error Description
In the
UniformEncoder
, replacing NaN raises the followingFutureWarning
sometimes:It gets raised here:
RDT/rdt/transformers/categorical.py
Line 200 in ecf7499
A fix here would be to use
ser.cat.remove_categories()
Step to reproduce
The text was updated successfully, but these errors were encountered: