does pd.get_dummies work on numerical data code example
Example 1: how to get dummies in a dataframe pandas
df = pd.get_dummies(df, columns=['type'])
Example 2: get dummies pandas
>>> pd.get_dummies(pd.Series(list('abc')), dtype=float)
a b c
0 1.0 0.0 0.0
1 0.0 1.0 0.0
2 0.0 0.0 1.0