eristoddle
4/25/2016 - 5:49 PM

Merge csvs with Pandas

Merge csvs with Pandas

from glob import iglob
import pandas as pd

files = sorted(iglob('*.csv'))
frames = [ pd.read_csv(f) for f in files ]
result = pd.concat(frames)
final_csv = result.to_csv('./final.csv')