Reputation: 45
I have a column in my dataframe called tags
abc
123489
abcdefg
qwerabcas
sid abc 239
8273491
Please give me a way for me to be able to display the rows where abc is present so the output will have rows
abc
abcdefg
qwerabcas
sid abc 239
Upvotes: 1
Views: 862
Reputation: 10960
Use pandas.Series.str.contains
df[df['tags'].str.contains('abc')]
Upvotes: 4