我正在使用python3,我想在其中添加(合并)没有共同行的两个数据帧。 从database1读取的df1值
import pandas as pd
df1=pd.DataFrame(columns={'STATE'})
**STATE**
TN
AP
KL
KA
WB
TG
OR
DL
PB
从数据库2读取的df2值
df2=pd.DataFrame(columns={'COUNTRY','YEAR','V1','V2','CAPITAL', 'MODE'})
**COUNTRY YEAR V1 V2 CAPITAL MODE**
INDIA 2020 1 122 NEW DELHI FLIGHT
必填df1 [STATE]行,其中重复了df2中的列值
df3
STATE COUNTRY YEAR V1 V2 CAPITAL MODE
TN INDIA 2020 1 122 NEW DELHI FLIGHT
AP INDIA 2020 1 122 NEW DELHI FLIGHT
KL INDIA 2020 1 122 NEW DELHI FLIGHT
KA INDIA 2020 1 122 NEW DELHI FLIGHT
WB INDIA 2020 1 122 NEW DELHI FLIGHT
TG INDIA 2020 1 122 NEW DELHI FLIGHT
OR INDIA 2020 1 122 NEW DELHI FLIGHT
DL INDIA 2020 1 122 NEW DELHI FLIGHT
PB INDIA 2020 1 122 NEW DELHI FLIGHT
预先感谢