filter dataframe pandas based on column value with matching substring code example Example: pandas filter string contain df[df['A'].str.contains("hello")]