简体   繁体   中英

Add Dataframe to list of dataframes

I have the following list of Dataframes twice: 数据框列表

Now i want to combine these lists to one list. So i want to add all the Dataframes from list two to list one.

Simple example:

a = pd.DataFrame([2,3,4,5])
b = pd.DataFrame([4,7,8,9,10])

c = [a,b]

d = pd.DataFrame([2,3,4,5])
e = pd.DataFrame([4,7,8,9,10])

f = [d,e]

# New list automatically:
g = [a,b,d,e]

You want to expand your list:

g = c + f

For example:

[1, 2, 3] + [4, 5, 6]
>>> [1, 2, 3, 4, 5, 6]

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