dummies = pd.get_dummies(df['Category']).rename(columns=lambda x: 
    'Category_' + str(x))
df = pd.concat([df, dummies], axis=1)
df = df.drop(['Category'], inplace=True, axis=1)
Creating dummy variables in pandas for python