运行 ❯
获取您自己的
Python
服务器
×
更改方向
更改主题,深色/浅色
转到 Spaces
import pandas as pd data1 = { "age": [16, 14, 10], "qualified": [True, True, True] } df1 = pd.DataFrame(data1) data2 = { "age": [55, 40], "qualified": [True, False] } df2 = pd.DataFrame(data2) newdf = df1.append(df2) print(newdf)
age qualified 0 16 True 1 14 True 2 10 True 0 55 True 1 40 False