Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas trim string of all cells

new_df = df.applymap(lambda x: x.strip() if type(x) == str else x)
 
PREVIOUS NEXT
Tagged: #pandas #trim #string #cells
ADD COMMENT
Topic
Name
8+1 =