I have multiple csv files that I would like to combine into one df.
They are all in this general format, with two index columns:
A simple way:
Creating a list with the names of csvs:
files=listdir() csvs=list() for file in files: if file.endswith(".csv"): csvs.append(file)
concatenate the csvs:
data=pd.DataFrame() for i in csvs: table=pd.read_csv(i) data=pd.concat([data,table])