title: How to check if a value in one column can contain more than value in another column
body: <p>I have the following dataframe:</p>
  
  <pre><code>df = pd.DataFrame()
  df['id'] = [1, 1, 2, 2]
  df['col1'] = [10, 10, 20, 20]
  df['col2'] = [100, 200, 50, 50]
  df['col3'] = [1, 2, 3, 4]
  </code></pre>
  
  <h2>The goal</h2>
  
  <p>From this dataframe, I want to return the part of the dataframe where a value in <strong>col1</strong> can have <strong>multiple values</strong> in <strong>col2</strong> for a particular <strong>ID</strong>. In this case, id '1' has a value in col1 of 10, and 100 in col2. As id '1' also has a value of 10 in col1 in the second row, the value in col2 should also be 100. This is not the case for this id, however, it is the case for ID '2'. It should work both ways, so the values of col1 and col2 should just be consistent with each other for a ID. Column 3 contains other values that are not important for the matching, but should be included in the dataframe.</p>
  
  <h2>Desired output</h2>
  
  <p>The part of the dataframe where the values of the columns are <strong>not</strong> matching.</p>
  
  <pre><code>df = pd.DataFrame()
  df['id'] = [1, 1]
  df['col1'] = [10, 10]
  df['col2'] = [100, 200]
  df['col3'] = [1, 2]
  </code></pre>