title: Find similar rows and subtract a particular column value in Pandas Dataframe
body: <p>I know there are similar problems and solutions in here, but I dont seem to find the exact solution.</p>
  
  <p>Wanted to find rows with "all but one" column similar.</p>
  
  <p>So,</p>
  
  <pre><code>     ColumnA     ColumnB     ColumnC    ColumnD  ColumnE  
  1      John        Texas       USA        115       5
  2      Mike        Florida     USA        66        1
  3      John        Texas       USA        115       4
  4      Justin      NewYork     USA        22        11
  </code></pre>
  
  <p>So the logic im trying to get is:</p>
  
  <pre><code>for every entry in the dataframe:
         if there exists "another" entry with all Columns similar, apart from ColumnE
          AND
         the value of ColumnE in First entry found "MINUS" the value of ColumnE in second entry found is "LESS" than "1":
                     Then append the entry to a new DataFrame
  
  </code></pre>
  
  <p>So far, I have used df.loc and df.duplicated to get somewhere there.
  The problem and data is a little more complicated so I would be able to post the code here.</p>
  
  <p>Any help with this would be super appreciated.</p>
  
  <p>Thanks,
  Rob</p>