pd.get_dummies what it is doing code example
Example 1: how to get dummies in a dataframe pandas
df = pd.get_dummies(df, columns=['type'])
Example 2: pandas.get_dummies
>>> pd.get_dummies(pd.Series(list('abcaa')), drop_first=True)
b c
0 0 0
1 1 0
2 0 1
3 0 0
4 0 0