I know there are similar problems and solutions in here, but I dont seem to find the exact solution.
Wanted to find rows with "all but one" column similar.
So,
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
So the logic im trying to get is:
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
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.
Any help with this would be super appreciated.
Thanks, Rob