pandas.Series.str.contains
Series.str.contains(self, pat, case=True, flags=0, na=nan, regex=True)[source]
Test if pattern or regex is contained within a string of a Series or Index.
Return boolean Series or Index based on whether a given pattern or regex is contained within a string of a Series or Index.
Parameters
pat str
Character sequence or regular expression.
casebool, default True
If True, case sensitive.
flags int, default 0 (no flags)
Flags to pass through to the re module, e.g. re.IGNORECASE.
na default NaN
Fill value for missing values.
regexbool, default True
If True, assumes the pat is a regular expression.
If False, treats the pat as a literal string.
Returns
Series or Index of boolean values
A Series or Index of boolean values indicating whether the given pattern is contained within the string of each element of the Series or Index.
The github link for this video is below 👇👇
https://github.com/RakeshKrishna143/P...