title: Remove columns from data frame with hashing
body: <p>Given two pandas dataframes:</p>
  
  <pre><code>df1 = pd.read_csv(file1, names=['col1','col2','col3'])
  df2 = pd.read_csv(file2, names=['col1','col2','col3'])
  </code></pre>
  
  <p>I'd like to remove all the rows in df2 where the values of either <code>col1</code> or <code>col2</code> (or both) do not exist in df1. </p>
  
  <p>Doing the following:</p>
  
  <pre><code>df2 = df2[(df2['col1'] in set(df1['col1'])) &amp; (df2['col2'] in set(df1['col2']))]
  </code></pre>
  
  <p>yields:</p>
  
  <blockquote>
    <p>TypeError: 'Series' objects are mutable, thus they cannot be hashed</p>
  </blockquote>