cudf.core.column.string.StringMethods.isinteger#
- StringMethods.isinteger() SeriesOrIndex[source]#
检查每个字符串中的所有字符是否构成整数。
如果一个字符串没有字符,则返回False。
- Returns:
- Series or Index of bool
与原始Series/Index长度相同的布尔值Series或Index。
另请参阅
示例
>>> import cudf >>> s = cudf.Series(["1", "0.1", "+100", "-15", "abc"]) >>> s.str.isinteger() 0 True 1 False 2 True 3 True 4 False dtype: bool >>> s = cudf.Series(["this is plan text", "", "10 10"]) >>> s.str.isinteger() 0 False 1 False 2 False dtype: bool