hipdf.core.accessors.string.StringMethods.endswith#
1 min read time
Applies to Linux
- StringMethods.endswith(pat: str | tuple[str, ...]) Series | Index#
Test if the end of each string element matches a pattern.
Parameters#
- patstr or tuple[str, …]
String pattern or tuple of patterns. Regular expressions are not accepted.
Returns#
- Series or Index of bool
A Series of booleans indicating whether the given pattern matches the end of each string element.
Examples#
>>> import cudf >>> s = cudf.Series(['bat', 'bear', 'caT', None]) >>> s 0 bat 1 bear 2 caT 3 None dtype: object >>> s.str.endswith('t') 0 True 1 False 2 False 3 <NA> dtype: bool