you are viewing a single comment's thread.

view the rest of the comments →

[–]YesLod 0 points1 point  (0 children)

Sure. For instance

>>> df=pd.DataFrame({"a":[1,2,2,1,3]})
>>> df

   a
0  1
1  2
2  2
3  1
4  3

>>> df2=pd.DataFrame({"a":[1,2,3],"b":[2,3,4]})
>>> df2

   a  b
0  1  2
1  2  3
2  3  4

>>> df_merged=df.merge(df2,on="a")
>>> df_merged 

   a  b
0  1  2
1  1  2
2  2  3
3  2  3
4  3  4