I am trying to read multiple excel files into a Pandas Dataframe.
I have got the below code in place:
allFiles = glob.glob(base2 + "/*.xls"). <<-- Reading from path where all files are stored
list_ = []
for file_ in allFiles:
df = pd.read_excel(io.BytesIO(open(file_, 'rb').read()), sheet_name='Sheet1') <<-- using io module to read the file as there are some issue with the text format
list_.append(df)
print(list_)
file = pd.DataFrame(list_)
When I open the Dataframe csv file, I see entire contents of a single file all in a single row. I am trying to have each row from the source file said in a separate row in the file output.