title: Create the column with right mapping
body: <p>I have a data frame df1 with one of the columns being "values". It looks like - </p>
  
  <pre><code>values
  ['acd3f','rt5gh8','5ty7e']
  ['rt5gh8','t67ui']
  </code></pre>
  
  <p>I have another dataframe df2 which contains two columns '0' and '1', with values like - </p>
  
  <pre><code>0         1
  acd3f    I am cool
  rt5gh8   I am not cool
  5ty7e    ok_sir
  t67ui    no_sir
  </code></pre>
  
  <p>I want to modify df1 to add a new column "value_names", which should look like - </p>
  
  <pre><code>values                        value_names
  ['acd3f','rt5gh8','5ty7e']    ['I am cool','I am not cool','ok_sir']
  ['rt5gh8','t67ui']            ['I am not cool','no_sir']
  </code></pre>
  
  <p>I am trying the below code - </p>
  
  <pre><code>df1['value_names'] = df1['values'].replace(df2.set_index('0')['1'].dropna())
  </code></pre>
  
  <p>It doesn't seem to work and gives me an error -</p>
  
  <pre><code>KeyError: '1'
  </code></pre>
  
  <p>Note:<br>
  Basically, what I had before instead of df2 was a list with mapping. I converted that to data frame df2 and these column names "0" and "1" in df2 are automatically assigned.</p>