Remove Leading and Trailing Whitespace with Pandas
Python
1| #Remove Trailing Whitespace 2| 3| df['text'] = df['text'].apply(str.rstrip) 4| 5| #Remove Leading Whitespace 6| 7| df['text'] = df['text'].apply(str.lstrip)
152
134
129
122