cudf.core.column.string.StringMethods.ishex#
- StringMethods.ishex() SeriesOrIndex[source]#
检查每个字符串中的所有字符是否构成一个十六进制整数。
如果一个字符串没有字符,则返回False。
- Returns:
- Series or Index of bool
与原始Series/Index长度相同的布尔值Series或Index。
示例
>>> import cudf >>> s = cudf.Series(["", "123DEF", "0x2D3", "-15", "abc"]) >>> s.str.ishex() 0 False 1 True 2 True 3 False 4 True dtype: bool