Python numpy.find()
numpy.core.defchararray.find(arr, substring, start=0, end=None) :查找指定范围内的子字符串的最低索引。
参数:
arr :要搜索的数组类或字符串。
substring :要搜索的子串。
start,end。[int, optional] 要搜索的范围。
返回值 :
一个整数数组,包含找到的子串的最低索引。
代码 #1:
输出:
代码 #2:
输出:
numpy.core.defchararray.find(arr, substring, start=0, end=None) :查找指定范围内的子字符串的最低索引。
参数:
arr :要搜索的数组类或字符串。
substring :要搜索的子串。
start,end。[int, optional] 要搜索的范围。
返回值 :
一个整数数组,包含找到的子串的最低索引。
代码 #1:
输出:
代码 #2:
输出: