print categories in each categorical variable in python code example Example: treat NaN as a category g_without_nan = g.cat.add_categories("D").fillna("D")