Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if string contains loop pandas

substr = ('dog', 'bird', 'cat')
df['B'] = df['A'].str.findall('|'.join(substr)).str.len()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #string #loop #pandas
ADD COMMENT
Topic
Name
9+9 =