I want to concatenate a dataframe (df) with another dataframe that is stored in a list of dataframes.
dflist = [df1, df2, df3]
What I want is a dataframe like below
new_dflist = [df+df1, df+df2, df+df3]
new_dflist = []
for n in dflist:
new_dflist.append(pd.concat(df, dflist[n]))
but I get the error message
TypeError: list indices must be integers or slices, not DataFrame
I also tried with enumerate but I get the error message
TypeError: list indices must be integers or slices, not tuple