Python Forum
Help with pandas dataframe
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with pandas dataframe
#1
Hey guys,

I have a data frame such as

dfA = 
    id                             jobtag    suc_score  
0   54                     channel manager          25
1   77                     channel manager          18
2   99                     client manager           23
3   80          corporate account manager            4
4  110                 compliance manager           25
and another dataframe such as

dfB = 
                             jobTag  occ  median_salary  suc_score
0  software development engineer iv    1              0        nan
1                   senior engineer   17              0        nan  
2     marriage and family therapist    1              0        nan  
3                           founder    1              0        nan  
4        principal network engineer    1              0        nan
what I want to do is map the suc_score from dfA to dfB based on the Jobtag
Means whenever jobtag from dfA matches jobtag from dfB I want the suc_score from the row in dfA to be added to dfB
How can I achieve that?

Cheers
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  HTML Decoder pandas dataframe column mbrown009 3 1,030 Sep-29-2023, 05:56 PM
Last Post: deanhystad
  Use pandas to obtain cartesian product between a dataframe of int and equations? haihal 0 1,119 Jan-06-2023, 10:53 PM
Last Post: haihal
  Pandas Dataframe Filtering based on rows mvdlm 0 1,432 Apr-02-2022, 06:39 PM
Last Post: mvdlm
  Pandas dataframe: calculate metrics by year mcva 1 2,312 Mar-02-2022, 08:22 AM
Last Post: mcva
  Pandas dataframe comparing anto5 0 1,261 Jan-30-2022, 10:21 AM
Last Post: anto5
  PANDAS: DataFrame | Replace and others questions moduki1 2 1,797 Jan-10-2022, 07:19 PM
Last Post: moduki1
  PANDAS: DataFrame | Saving the wrong value moduki1 0 1,551 Jan-10-2022, 04:42 PM
Last Post: moduki1
  update values in one dataframe based on another dataframe - Pandas iliasb 2 9,264 Aug-14-2021, 12:38 PM
Last Post: jefsummers
  empty row in pandas dataframe rwahdan 3 2,447 Jun-22-2021, 07:57 PM
Last Post: snippsat
Question Pandas - Creating additional column in dataframe from another column Azureaus 2 2,964 Jan-11-2021, 09:53 PM
Last Post: Azureaus

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020