问题
Lets say i have 2 databases.The column names of the two databases are as follows:
db1: name, age, gender, mother_name, father_name
db2: name, gender, status, birthdate
As you can see, both db1 and db2 have common fields of 'name' and 'gender'. I want to insert the data from db2 in db1 which have they same fields.
回答1:
if you give us an expected output it could be more precise. But as i understand:
db1 = db1.merge(db2, on=["name","gender"], how="left")
来源:https://stackoverflow.com/questions/59445001/how-to-insert-they-same-field-in-other-database