I am trying to do vlookup using pandas in python,but getting wrong result. I have two excel workbooks: First:
Share Folder name Unnamed: 3 value2 Unnamed: 5
A INDIA 11 Change
B INDIA 15 Change
C INDIA 33 Change
A INDIA 12 Change
B INDIA 74 Change
A INDIA 740 Change
Second:
Share Folder name email: 5
A abc@gmail.com
B bca@gmail.com
C gba@gmail.com
I want to do vlookup by using First and second table and want to get following result:
Share Folder name Unnamed: 3 value2 Unnamed:5 email:5
A INDIA 11 Change abc@gmail.com
B INDIA 15 Change bca@gmail.com
C INDIA 33 Change gba@gmail.com
A INDIA 12 Change abc@gmail.com
B INDIA 74 Change bca@gmail.com
A INDIA 740 Change abc@gmail.com
I tried following code but didnt workded:
First.merge(Second,on='Share Folder name')
First.merge(Second, on="Share Folder name", how = 'left')
What i want is repeating values in First should get email id's corresponding to the Second table where values are not repeating.