I have around 2000 CSV files in my folder. I want to read them in in their chronological order. They are named with numbers so it must be easy I thought.
I am reading them in with this following code. I can imagine a very simple solution since there must be an easy parameter for that. But I havent found anything :(((
def csv_to_df():
dff_all_from_csv = []
for root, dirs, files in os.walk("output/csv_files"):
for file in files:
df = pd.read_csv(os.path.join(root, file))
dff_all_from_csv.append(df)
return dff_all_from_csv