I am having a Dataframe which has unnamed column after the concatenation of various csv file. How can I remove it?
Code -
xls = pd.ExcelFile('amex-listing.xlsx')
exchanges = xls.sheet_names
pd.options.display.width = 10000
final_file = 'listing.xlsx'
listings = []
for exchange in exchanges:
listing = pd.read_excel('amex-listing.xlsx',sheet_name=exchange, na_values='NaN', index_col=False)
listing['exchange'] = exchange
sup_df = pd.DataFrame()
sup_df = listing.append(sup_df)
listings.append(sup_df)
listings = pd.concat(listings)
listings = listings.reset_index(drop=True)
print(listings)
Excel data -
Data frame -
What should be the best approach to remove the unnamed Dataframe? Also, how can I name this Dataframe if possible?