📖 INDEX
LOADING ENGINE...
Series.str.len()
AI & DATA SCIENCE // series-str-len
Compute the length of each string in the Series/Index.
Syntax
df['length'] = df['name'].str.len()Examples
Example 01Basic Usage
df['length'] = df['name'].str.len()Best Practices
- Use vectorized operations over iterations (e.g.
iterrows()) for performance. - Always verify memory usage when loading large files.