When I look for a word in a data frame it shows me every entry containing those letters but I really want for it to show me that specific word. Can you help me out?
Here is and example:
import pandas as pd
d = {'col1': ['ROL', 'ROVER','ROL','ROLLER','ROL','TROLLER','rol','rolter','nan'] ,'col2': [1, 2,3,4,5,6,7,9,10]}
df = pd.DataFrame(data=d)
ROL = df[df['col1'].fillna(0).str.contains("ROL|rol",na=False)]
The output is something like this
but what I really wanted was something without those entries