# load multiple csv files into dataframe
import glob
import pandas as pd
csv_files = glob.glob("/content/sample_data/*.csv")
df = [pd.read_csv(filename) for filename in csv_files]
import os
# current directory csv files
csvs = [x for x in os.listdir('.') if x.endswith('.csv')]
# stats.csv -> stats
fns = [os.path.splitext(os.path.basename(x))[0] for x in csvs]
d = {}
for i in range(len(fns)):
d[fns[i]] = pd.read_csv(csvs[i])