Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python - count values that contain special characters

special = '[(_:/,#%=@)]'                    # Define special characters
df['count'] = df['myvar'].str.count(special) # Count them
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #count #values #special #characters
ADD COMMENT
Topic
Name
9+2 =