You are viewing documentation about an older version (1.21.0). View latest version

modin.pandas.Series.str.len¶

Series.str.len()[source]¶

Get the length of a string. For non-string values this returns the length of the string representation.

Returns:

A Series with the length of each value

Return type:

Series

Examples

>>> s = pd.Series(['dog',
...                 '',
...                 5,
...                 {'foo' : 'bar'},
...                 [2, 3, 5, 7],
...                 ('one', 'two', 'three')])
>>> s.str.len()
0    3.0
1    0.0
2    NaN
3    NaN
4    NaN
5    NaN
dtype: float64
Copy