Low = df_dummies = pd.get_dummies(labour3, columns=['lab_attach'])df_dummies = Low.drop(['lab_attach_2','lab_attach_3'], axis=1)df_dummies.rename(columns={'lab_attach_1':'low'},inplace=True)df_dummies
1234567