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
  How to search for specific string in Pandas dataframe Coding_Jam 0 60 Oct-22-2020, 07:19 PM
Last Post: Coding_Jam
  PANDAS: DataFrame | White Spaces & Special Character Removal traibr 1 441 Sep-10-2020, 07:02 PM
Last Post: eddywinch82
  No Output In Pandas DataFrame Query eddywinch82 1 266 Aug-17-2020, 09:25 PM
Last Post: eddywinch82
  strange error from pandas dataframe djf123 1 683 Jul-27-2020, 05:25 AM
Last Post: scidam
  Pandas DataFrame not updating HelpMePlease 3 460 Jul-11-2020, 07:19 PM
Last Post: jefsummers
  Pandas DataFrame visual Truman 8 618 Jul-10-2020, 06:11 AM
Last Post: hussainmujtaba
  Pandas DataFrame and unmatched column sritsv19 0 445 Jul-07-2020, 12:52 PM
Last Post: sritsv19
  Pandas DataFrame Concatenate problems Kristenl2784 1 362 Jul-01-2020, 01:28 AM
Last Post: hussainmujtaba
  Difference of two columns in Pandas dataframe zinho 2 675 Jun-17-2020, 03:36 PM
Last Post: zinho
  error bars with dataframe and pandas Hucky 4 639 Apr-27-2020, 02:02 AM
Last Post: Hucky

Forum Jump:

User Panel Messages

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