Pandas fillna throws ValueError: fill value must be in categories
问题 Discription: both features are in categorical dtypes. and i used this code in a different kernal of same dateset was working fine, the only difference is the features are in flote64. later i have converted these feature dtypes into Categorical because all the features in the dataset represents categories. Below is the code: AM_train['product_category_2'].fillna('Unknown', inplace =True) AM_train['city_development_index'].fillna('Missing', inplace =True) 回答1: Use Series.cat.add_categories for