cudf.core.accessors.string.StringMethods.isfloat#
- StringMethods.isfloat() Series | Index[source]#
Check whether all characters in each string form floating value.
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.
isdigitCheck whether all characters are digits.
isintegerCheck whether all characters are integer.
isnumericCheck whether all characters are numeric.
islowerCheck whether all characters are lowercase.
isspaceCheck whether all characters are whitespace.
isupperCheck whether all characters are uppercase.
Examples
>>> import cudf >>> s = cudf.Series(["1.1", "0.123213", "+0.123", "-100.0001", "234", ... "3-"]) >>> s.str.isfloat() 0 True 1 True 2 True 3 True 4 True 5 False dtype: bool >>> s = cudf.Series(["this is plain text", "\t\n", "9.9", "9.9.9"]) >>> s.str.isfloat() 0 False 1 False 2 True 3 False dtype: bool