Category type is discarded with where
series method
#18888
Labels
Categorical
Categorical Data Type
good first issue
Needs Tests
Unit test(s) needed to prevent regressions
Milestone
Code Sample, a copy-pastable example if possible
Problem description
Categories are dropped when using the
pd.Series.where
method. This increases memory usage for categorical data by making large temporaries and increases the noisiness of code as the type must be reinforced after the statement.Expected Output
Output of
pd.show_versions()
Is the one in the ubuntu repos:
The text was updated successfully, but these errors were encountered: