There are multiple CSV files in the input folder, and they are output together in one CSV.
import glob
import pandas as pd
files = glob.glob('input/*.csv')
files.sort()
df_list = []
for file in files:
df_next = pd.read_csv(file)
df_list.append(df_next)
df = pd.concat(df_list, ignore_index=True)
df.to_csv('output.csv')
Recommended Posts