title: Map dictionary values to key values in a dataframe column
body: <p>I have a dataframe:</p>
  
  <pre><code>values
   NaN
   NaN
   [1,2,5]
   [2]
   [5]
  </code></pre>
  
  <p>And a dictionary</p>
  
  <pre><code>{nan: nan,
  '1': '10',
   '2': '11',
   '5': '12',}
  </code></pre>
  
  <p>The dataframe contains keys from the dictionary.</p>
  
  <p>How can I replace these keys with the corresponding values from the same dictionary?</p>
  
  <p>Output:</p>
  
  <pre><code>values
   NaN
   NaN
   [10,11,12]
   [11]
   [12]
  </code></pre>
  
  <p>I have tried</p>
  
  <pre><code>so_df['values'].replace(my_dictionary, inplace=True)
  so_df.head()
  </code></pre>