Skip to content

Instantly share code, notes, and snippets.

@kxzk
Created August 9, 2019 21:40
Show Gist options
  • Save kxzk/1a4dee65a7a3add1d877f6bf80fa5233 to your computer and use it in GitHub Desktop.
Save kxzk/1a4dee65a7a3add1d877f6bf80fa5233 to your computer and use it in GitHub Desktop.
from pandas.api.types import union_categoricals
food = pd.Categorical(["burger king", "wendys"])
food_2 = pd.Categorical(["burger king", "chipotle"])
union_categoricals([food, food_2])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment