hipdf.core.column.string.StringMethods.byte_count

hipdf.core.column.string.StringMethods.byte_count#

20 min read time

Applies to Linux

StringMethods.byte_count() SeriesOrIndex#

Computes the number of bytes of each string in the Series/Index.

Returns#

Series or Index of int

A Series or Index of integer values indicating the number of bytes of each strings in the Series or Index.

Examples#

>>> import cudf
>>> s = cudf.Series(["abc","d","ef"])
>>> s.str.byte_count()
0    3
1    1
2    2
dtype: int32
>>> s = cudf.Series(["Hello", "Bye", "Thanks 😊"])
>>> s.str.byte_count()
0     5
1     3
2    11
dtype: int32