keep all rows that have a substring in column pandas code example Example: pandas filter string contain df[df['A'].str.contains("hello")]