This is similar to a few questions regarding this topic.
I have a df
for each day
in the month
. the df's
are exported daily and I want to concatenate
them to create a monthly
df
. I'm currently performing this via the following:
import pandas as pd
df1 = pd.read_csv('df1.csv')#1st
df2 = pd.read_csv('df2.csv')#2nd
df3 = pd.read_csv('df3.csv')#3rd ect
concat_df = pd.concat([df1, df2, df3])
I repeat this 30 odd times. Is there a more efficient way to concatenate
these df's
if the initial df
in the directory
is the first day of the month and the final df
is the last day of the month.
As in;
For directory 'month'
concatenate
all files?
Rather than reading
each individual df
and concatenating
30 odd df's