0

I have an excel file with following structure

excel sheet image

I need to copy the first two columns to a new sheet

My problem is, I need to do this for bulk files. How can I do the same using python?


import pandas as pd
  
df = pd.read_excel("sample.xlsx")
#print(df)

# Here 0th column will be extracted
df = pd.read_excel("sample.xlsx",
                index_col = 0)

print(df)

This is what I have.

K.dj
  • 13
  • 4

0 Answers0