I'am trying to consolidate many excel files into one Master excel file but my "many files" has different headers names. So I want to consolidate all those into one. (they have similar words in headers).
This is my code right now:
excel_files = glob.glob(location)
df1 = pd.DataFrame()
for excel_file in excel_files:
df2 = pd.read_excel(excel_file, header=None)
df1 = pd.concat([df1,df2])
df1.to_excel("...")
what I get:
| Ticket ID | Vendor ID | Supplier ID | Supplier original ID | 
|---|---|---|---|
| 1234 | ABCD | ||
| 5678 | DCCD | ||
| 9876 | AADS | 
What I want:
| Ticket ID | Supplier ID | 
|---|---|
| 1234 | ABCD | 
| 5678 | DCCD | 
| 9876 | AADS | 
Please help!
 
    