-1

Can anyone know that how to delete same single column from multiple xlsx sheet using python?

After that those sheets save it to same path.

Suchit SD
  • 1
  • 1
  • Does this answer your question? [Import multiple csv files into pandas and concatenate into one DataFrame](https://stackoverflow.com/questions/20906474/import-multiple-csv-files-into-pandas-and-concatenate-into-one-dataframe) – Travis Jan 10 '20 at 11:30

1 Answers1

0

First of all you should create a list with the Excel workbooks and save in a variable called "files":

dfs = []

for file in files:
    df = pd.read_excel(file, sheet_name = None)
    dfs.append(df)

col_to_delete = ['Your columns']

for df in dfs:
    #Here you delete one by one
    df.drop(labels = col_to_delete, inplace = True)

After that, I don't know if you want to merge all the .xlsx or overwrite, but this is another question, look at documentation for pd.Write() to save the files

Hope it helps

Dr.Will
  • 183
  • 1
  • 1
  • 8