I have two Pandas dataframes (Python3). It will look like below.
df1
name, score
Tom, 130
Jane, 98
Anny, 81
Chuck, 92
df2
name
Amy
Chuck
Dave
Danny
Emma
Jack
Tom
Taro
What I want to do is to look at df1 and if any name found in df2, remove name, score row from df1 altogether.
I searched around the best way to do this, but none of them worked for me. (Or, probably I don't use the function in the right way.) For example,
output= (df1!=df2)
This returns,
ValueError: Can only compare identically-labeled DataFrame objects
So, it does not take into account score column.
What I expect is to get,
name, score
Jane, 98
Anny, 81
Jane and Anny are not in the df2.
How can I do this?