I am trying write a code that can read from a dataframe that has thousands of rows like:
name value
abc123 wrd
abc123 wrd
abc123 wrd
abc987 wrd
abc987 wrd
abc987 bbs
.. ..
I want the code to show me the name that has only the value wrd, for example in this case after the code works it should only show the result as abc123, since abc987 has both wrd and bss as value.
What I did so far is:
import pandas as pd
result = df[df['value'].isin(['wrd', 'bbs'])]
this results in both abc123 and abc987
result = df[df['value'].isin(['wrd'])]
this results in again both abc123 and abc987
What should I use instead to get name of the ones that only has the value as wrd?