You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That happens because the test assumes both None and np.nan will be treated the same way. However, the categorical transformer uses value_counts, which no longer has that behaviour.
The new pandas release no longer coerces null-like values in
value_counts
andmode
to a NaN value. This change causes an error in the following test:RDT/tests/unit/transformers/test_categorical.py
Line 145 in 40d2667
That happens because the test assumes both
None
andnp.nan
will be treated the same way. However, the categorical transformer usesvalue_counts
, which no longer has that behaviour.RDT/rdt/transformers/categorical.py
Line 92 in 40d2667
This error can be fixed by simply converting the
None
to anp.nan
in the following line:RDT/tests/unit/transformers/test_categorical.py
Line 159 in 40d2667
Note: This issue only shows up on python 3.8. Neither py3.7 nor py3.9 cause this to happen, and I have no clue why.
The text was updated successfully, but these errors were encountered: