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.