title: How can I extract data from another dataframe for rows with same id?
body: <p>I am trying to compare dataframe A and B, both with a column "id", and create a new column in dataframe A that writes the value of a column "description" in dataframe B, if the ids for both dataframes match. If the id is not found in dataframe B I would just leave it blank "". </p>
  
  <p>B is a smaller dataframe than A.</p>
  
  <p>Right now I created a boolean column that tells me if the id is found in dataframe B:</p>
  
  <pre><code>A["found_in_b"] = A["id_a"].isin(B['id_b'])
  </code></pre>
  
  <p>Pd: I tried an approach of comparing the ids with iteritems and then trying to save the "description" value but it wouldn't save anything.
  Another thing I tried is this:</p>
  
  <pre><code>A.loc[A.found_in_b &gt; 0, 'description'] = B.description[B['id_b'].values == A["id_a"].values]
  </code></pre>
  
  <p>But it didn't work either. I am stuck at this point and any tip or guidance for extracting the "description" column for rows that have matching ids would help me a lot to finish my first data project.</p>