Advertisement
elena1234

how to trim row in dataframe in Python

Dec 8th, 2022
858
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | Source Code | 0 0
  1. # trim at the beginning and at the end in every row in dataframe
  2. new_ulici_df = new_ulici_df.applymap(lambda x: " ".join(x.split()) if isinstance(x, str) else x)
  3.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement