简体   繁体   中英

Python Dataframe list of lists of dataframes into a single dataframe

I have a big list consisting of 39 sublists. Each sublist has many dataframes. Now, I want to convert them into a single dataframe.

在此处输入图像描述

My code:

append_data = [[Dataframe,...][Dataframe,...]]
combined_csv = pd.concat(append_data) 

Present output:

    raise TypeError(msg)

TypeError: cannot concatenate object of type "<class 'list'>"; only pd.Series, pd.DataFrame, and pd.Panel (deprecated) objs are valid

You can do two concat

pd.concat(pd.concat(x) for  x in append_data )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM