Answers for "pandas trim string of all cells"

0

pandas trim string of all cells

new_df = df.applymap(lambda x: x.strip() if type(x) == str else x)
Posted by: Guest on May-09-2022

Code answers related to "pandas trim string of all cells"

Python Answers by Framework

Browse Popular Code Answers by Language