Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python check if dataframe series contains string

mel_count=a['Names'].str.contains('Mel').sum()
if mel_count>0:
    print ("There are {m} Mels".format(m=mel_count))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #check #dataframe #series #string
ADD COMMENT
Topic
Name
3+8 =