I have a large dataset (1M+ rows, and 50 columns). I've created a fake dataset below to highlight my issue. I'm trying to determine the parts that are used ONLY used on Ford OR VW (and not on other car brands), but am not sure how to approach this.
In reality, I have about 500 'car brands', and may want to look for 30+ of these, therefore if I can search by isin(list), that would be perfect.
data = { 'part': ['A','A','B','B','B','C','C','D','D','D','D','E','F','F','G'],'make': ['VW','Ford','VW','Nissan','Ford','VW','Nissan','Ford','Mazda','VW','Ford','VW','Ford','Mazda','Ford'],}
df = pd.DataFrame(data)
For Ford or VW, the result should be A,E and G. (As A has only Ford and VW, and E has only VW, and G has only Ford)