hipdf.core.column.string.StringMethods.len

hipdf.core.column.string.StringMethods.len#

20 min read time

Applies to Linux

StringMethods.len() SeriesOrIndex#

Computes the length of each element in the Series/Index.

Returns#

Series or Index of int

A Series or Index of integer values indicating the length of each element in the Series or Index.

Examples#

>>> import cudf
>>> s = cudf.Series(["dog", "", "\n", None])
>>> s.str.len()
0       3
1       0
2       1
3    <NA>
dtype: int32