Concatenate a list of pandas dataframes together Concatenate a list of pandas dataframes together python python

Concatenate a list of pandas dataframes together


Given that all the dataframes have the same columns, you can simply concat them:

import pandas as pddf = pd.concat(list_of_dataframes)


If the dataframes DO NOT all have the same columns try the following:

df = pd.DataFrame.from_dict(map(dict,df_list))


You also can do it with functional programming:

from functools import reducereduce(lambda df1, df2: df1.merge(df2, "outer"), mydfs)