Ok so I am trying to import a spreadsheet in excel and export it out after its been formatted. I already formatted it. The format is repositioning columns ok. So when i export it for whatever reason it adds a column A with an empty title that numbers each row. Please help fix my code so that it does not print this first column. Yes I have done research I tried using "df.drop(df.columns[-1], axis=1)", It doesn't work.
df = pd.read_excel('demo1.xls')
cols = df.columns.tolist()
cols = cols[-1:] + cols[:-1]
df = df[cols]
df.drop(df.columns[-1], axis=1)
df.to_excel('demo.xlsx')