Pandas: Get Dummies

You can try :

df = pd.get_dummies(df, columns=['type'])

Leave a Comment