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

modin.pandas.Series.str.len

Series.str.len()[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.21.0/../../../../../opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/modin/pandas/series_utils.py#L399-L400)

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
Language: English