I am currently doing a project where i have to make some transformations and cleaning from an excel file that has the same table in each sheet only that each sheet is representing a different month (different values in the tables).
Therefore the code that will make the transformations is the same only for a different sheet.
df_at_jan = pd.read_excel("C:/Users/Spiros/Desktop/Reporting.xlsx",
sheet_name='Jan 2018')
df_at_feb = pd.read_excel("C:/Users/Spiros/Desktop/Reporting.xlsx",
sheet_name='Feb 2018')
df_at_jan.drop([0,1,2],axis=0)
df_at_jan.columns = df_at_jan.iloc[3]
df_at_feb.drop([0,1,2],axis=0)
df_at_feb.columns = df_at_feb.iloc[3]
Of course i have to do this for all the months and i was wondering how i can do this with a for loop in order not to re-create the code for every different month.
I am very new to Python so any help will be much appreciated.
Thanks a lot!