hipdf.core.column.string.StringMethods.isalnum#
21 min read time
- StringMethods.isalnum() SeriesOrIndex #
Check whether all characters in each string are alphanumeric.
This is equivalent to running the Python string method str.isalnum() for each element of the Series/Index. If a string has zero characters, False is returned for that check.
Equivalent to:
isalpha() or isdigit() or isnumeric() or isdecimal()
Returns#
- Series or Index of bool
Series or Index of boolean values with the same length as the original Series/Index.
See Also#
- isalpha
Check whether all characters are alphabetic.
- isdecimal
Check whether all characters are decimal.
- isdigit
Check whether all characters are digits.
- 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 >>> s1 = cudf.Series(['one', 'one1', '1', '']) >>> s1.str.isalnum() 0 True 1 True 2 True 3 False dtype: bool
Note that checks against characters mixed with any additional punctuation or whitespace will evaluate to false for an alphanumeric check.
>>> s2 = cudf.Series(['A B', '1.5', '3,000']) >>> s2.str.isalnum() 0 False 1 False 2 False dtype: bool