python dataframe update cell contains string code example Example: dataframe column contains string df[df['A'].str.contains("hello")]