I have a data frame as shown below
Prop_ID Unit_ID Prop_Usage Unit_Usage
1 1 Res Res
1 2 Res Com
1 3 Res Ind
1 4 Res Res
2 1 Com Res
2 2 Com Com
2 3 Com Com
3 1 Ind Ind
3 2 Ind Com
From the above it is clear that one property may have more than 1 units. That means units are the subcategory of properties.
From the above data I want to filter rows where Prop_Usage does not match with Unit_Usage.
Expected Output:
Prop_ID Unit_ID Prop_Usage Unit_Usage
1 2 Res Com
1 3 Res Ind
2 1 Com Res
3 2 Ind Com