menu_book Course Curriculum (Data Science Foundations) expand_more
Workflow & Data
NumPy
pandas
Cleaning
EDA & Statistics
Visualization
Feature Engineering
Text length feature
Learn Text length feature in Data Science Foundations with a focused explanation, a topic-specific example, edge guidance, and a mastery check.
12 min read
•
Advanced
data-science-068.py
python
import pandas as pd
text=pd.Series(["short","a somewhat longer review"])
features=pd.DataFrame({"chars":text.str.len(),"words":text.str.split().str.len()})
print(features)
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content