Master programming syntax, solve interactive challenges & run live code in Syntaxis Explore Arena →
menu_book Course Curriculum (Pandas) expand_more
Pandas / Cleaning Data

string strip and normalize

Learn string strip and normalize in Pandas with a dedicated explanation, a concept-specific example, practical cautions, and a mastery check.

12 min read • Intermediate
pandas-022.py
python
import pandas as pd
s=pd.Series(['  Alice ','BOB  ',' carol'])
print(s.str.strip().str.title())
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content