A string method performs an operation on textual values, such as measuring length, testing content, replacing text, or extracting information. In pandas, string methods are applied to a Series through the str accessor and return a new Series that can replace, extend, or accompany the original data. section 9.0
Filter strings containing a target pattern
Given s = Series('this is a test 123 456'.split()), evaluate s.str.contains('[ae]') to obtain a Boolean Series, then use s.loc[s.str.contains('[ae]')] to retain the matching values, such as “a” and “test”.

