Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

91
Views
Pd merge specific column

can u help me, how to do vlookup or pd merge on speccific column in the blank excel column. I just know how to do pd merge and the value come as a new column

I have a dataframe df1

  index id  Value   Info        
0   0   A1          xxx 
1   1   A2          xxx 
2   2   A3          xxx 
3   3   A4          xxx 

and also this data frame df2

  index id  Value           
0   0   A1  Apple       
1   1   A2  Orange      
2   2   A3  Banana      
3   3   A4  Grape       

I wish to get to the following outcome when merging df1 and df2

  index id  Value   Info        
0   0   A1  Apple   xxx 
1   1   A2  Orange  xxx 
2   2   A3  Banana  xxx 
3   3   A4  Grape   xxx 
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

This could be straight forward considering pandas operations.

df1 = pd.DataFrame({"index":[0,1,2,3],"id":["A1","A2","A3","A4"],"Info":['xx1','xx2','xx3','xx4']})
df1

df2 = pd.DataFrame({"index":[0,1,2,3],"id":["A1","A2","A3","A4"],"Value":['Apple','Orange','Banana','Grape']})
df2

You could use:

df1.merge(df2)

which gives the below output:

index   id  Info    Value
0   0   A1  xx1     Apple
1   1   A2  xx2     Orange
2   2   A3  xx3     Banana
3   3   A4  xx4     Grape
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!