我必须要大桌子 例如
df1 =
Name Age
Alex 20
Bob 19
Don 56
df2 =
Name PL
Don Python
Bob C
Alex java
我想得到
df3 =
Name Age PL
Alex 20 Java
Bob 19 C
Don 56 Python
答案 0 :(得分:0)
可能的解决方案之一:
df3 = pd.merge(df1, df2, on='Name')
结果是:
Name Age PL
0 Alex 20 Java
1 Bob 19 C
2 Don 56 Python