How to filter rows containing a string pattern from a Pandas dataframe [duplicate] October 5, 2022 by Tarik In [3]: df[df['ids'].str.contains("ball")] Out[3]: ids vals 0 aball 1 1 bball 2 3 fball 4