cudf.core.column.string.StringMethods.isipv4#
- StringMethods.isipv4() SeriesOrIndex[source]#
检查每个字符串中的所有字符是否构成一个IPv4地址。
如果一个字符串没有字符,则返回False。
- Returns:
- Series or Index of bool
与原始Series/Index长度相同的布尔值Series或Index。
示例
>>> import cudf >>> s = cudf.Series(["", "127.0.0.1", "255.255.255.255", "123.456"]) >>> s.str.isipv4() 0 False 1 True 2 True 3 False dtype: bool