Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas replace multiple values in column

# Specify Patterns to remove
removal_list = '|'.join(['
','
','	','
','>','<'])
# Replace each occurance with nothing ('') and replace the column
df['columnA'] = df['columnA'].str.replace(removal_list,'')
Source by pythonexamples.org #
 
PREVIOUS NEXT
Tagged: #pandas #replace #multiple #values #column
ADD COMMENT
Topic
Name
5+7 =