cudf.core.accessors.string.StringMethods.isdigit#
- StringMethods.isdigit() Series | Index[source]#
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
isalnumCheck whether all characters are alphanumeric.
isalphaCheck whether all characters are alphabetic.
isdecimalCheck whether all characters are decimal.
isintegerCheck whether all characters are integer.
isnumericCheck whether all characters are numeric.
isfloatCheck whether all characters are float.
islowerCheck whether all characters are lowercase.
isspaceCheck whether all characters are whitespace.
isupperCheck whether all characters are uppercase.
Examples
>>> import cudf >>> s = cudf.Series(['23', '³', '⅕', ''])
The
s.str.isdigitmethod is the same ass.str.isdecimalbut also includes special digits, like superscripted and subscripted digits in unicode.>>> s.str.isdigit() 0 True 1 True 2 False 3 False dtype: bool