filter if column contains string pandas code example Example: dataframe column contains string df[df['A'].str.contains("hello")]