hipdf.core.column.string.StringMethods.isdigit#
21 min read time
- StringMethods.isdigit() SeriesOrIndex #
Check whether all characters in each string are digits.
This is equivalent to running the Python string method str.isdigit() for each element of the Series/Index. If a string has zero characters, False is returned for that check.
Returns#
- Series or Index of bool
Series or Index of boolean values with the same length as the original Series/Index.
See Also#
- isalnum
Check whether all characters are alphanumeric.
- isalpha
Check whether all characters are alphabetic.
- isdecimal
Check whether all characters are decimal.
- isinteger
Check whether all characters are integer.
- isnumeric
Check whether all characters are numeric.
- isfloat
Check whether all characters are float.
- islower
Check whether all characters are lowercase.
- isspace
Check whether all characters are whitespace.
- isupper
Check whether all characters are uppercase.
Examples#
>>> import cudf >>> s = cudf.Series(['23', '³', '⅕', ''])
The
s.str.isdigit
method is the same ass.str.isdecimal
but also includes special digits, like superscripted and subscripted digits in unicode.>>> s.str.isdigit() 0 True 1 True 2 False 3 False dtype: bool