Fillna a categories series with another series breaks #13628
Labels
Bug
Categorical
Categorical Data Type
good first issue
Testing
pandas testing functions or related to the test suite
Milestone
On pandas 0.18.1, for some values of
a, b
Code Sample
pd.Categorical([1,2,None, None]).fillna(pd.Series([1,1, a, b]))
Expected Output
Either the same as
pd.Categorical([1, 2, a, b])
or
ValueError: fill value must be in categories
If a or b do not match the categories. This is what whe get when we do
pd.Categorical([1, 2, None, None]).fillna(3)
Actual output
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
This error message seems rather unenlightening...
The text was updated successfully, but these errors were encountered: