str.not contains python code example
Example 1: dataframe column contains string
df[df['A'].str.contains("hello")]
Example 2: python string contains
>>> str = "Messi is the best soccer player"
>>> "soccer" in str
True
>>> "football" in str
False
Example 3: python string does not contain
str = '£35,000 per year'
# check for '£' character in the string
'£' not in str
# >> False
'£' in str
# >> True