background: python, pandas, excel
there are 100 filse and type is .xlsx, and every file has 10000 rows and 50 cols; I want to concat them into one excel;
I has tried to concat them by pandas.concat() As shown below:
org_dir = 'D:/soft/project/excel'
out_filepath = 'D:/soft/project/excel/concat_file.xlsx'
res_df = []
for file in os.listdir(org_dir):
cur_df = pandas.read_excel(os.path.join(org_dir, file),
dtype=str)
res_df.append(cur_df)
concat_df = pandas.concat(res_df, ignore_index=True)
wr_concat = pandas.ExcelWriter(out_filepath, engine='openpyxl')
concat_df.to_excel(wr_concat, index=False)
wr_concat.close()
but it need more than 20 minutes; so have one greater solution to solve it ?