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