for k in [df1,df2,df3,df4,df5]:
y = pd.get_dummies(k['Fuel_Type'], prefix='Fuel')
k = pd.concat([y,k], axis=1)
k.drop('Fuel_Type', axis=1, inplace=True)
I have 5 dataframes with column Fuel_Type which I want to be dummied and concatenated on the same dataframe. I have tried this out there is no error but the dataframes are not modified after this loop they are same as they were before.
My output should be like all 5 dataframes with dummy variable columns of Fuel_Type variable.