title: If item within list in pandas column is a dictionary key, replace with value, if not in dictionary, delete
body: <p>If a pandas column contains a list, you can use a dictionary to convert all the values using </p>
  
  <pre><code>df['listColumn'] = df['listColumn'].apply(lambda x: [columnDictionary[i] for i in x])
  </code></pre>
  
  <p>However, there are instances where not all the items in a list are keys to the dictionary. In that case, how do you replace those items with nothing. </p>
  
  <p>For example</p>
  
  <pre><code>columnDictionary = {a:1, b:2, d:7, f:8 }
  </code></pre>
  
  <p>Specific Pandas row/column: [ a, b, c, d, e]</p>
  
  <p>Specific Pandas row/column after conversion: [ 1, 2, 7]</p>