Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data_obj = data.select_dtypes(['object'])
- data[data_obj.columns] = data_obj.apply(lambda x: x.str.strip())
- data.head()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement