DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
5+2 =
Submit