title: Create new column in dataframe by applying math operation to column values based on a match
body: <p>I have the following dataframes:</p>
  
  <pre><code>df1
  name  phone  duration(m)
  Luisa 443442  1
  Jack  442334  6
  Matt  442212  2
  Jenny 453224  1
  
  df2
  prefix charge rate
  443     0.8   0.3
  446     0.8   0.4
  442     0.6   0.1
  476     0.8   0.3
  </code></pre>
  
  <p>my desired output is to match each phone number with its prefix (there are more prefixes than phone numbers) and calculate how much to charge per called by multiplying the duration of call for each phone number by the corresponding prefix charge plus the corresponding rate.</p>
  
  <p>output ex.</p>
  
  <pre><code>df1
      name  phone  duration(m) bill
      Luisa 443442  1          (example: 1x0.3+0.8)
      Jack  442334  6          (example: 6x0.1+0.6)
      Matt  442212  2
      Jenny 453224  1
  </code></pre>
  
  <p>my idea was to convert df2 to a dictionary like so dict={'443':[0.3,0.8],'442':[0.1,0.6]...} so i could match each number with the dict key and then do the opertion with the corresponding value of that matching key. However is not working and would also like to know if there is a better alternative.</p>