My data look like:
A B C Month
0 1 3 5 Jan
1 1 2 3 Feb
I need to: a) convert 'Month' to dummies
df2 = pd.get_dummies(df,columns=['Month'],drop_first=True,prefix = 'm')
b) Multiply A / B / C with all dummies generated. The only way I can think of doing this is
df_Feb = df2[['A','B','C']].multiply(df2['m_Feb], axis = "index")
df_March
...
and then join all newly created dataframe, which isn't very convenient. Is there is better way to approach this