我试图在一定范围内找到一个匹配项。我可以在整个列中找到它,但我需要搜索的范围是一个移动范围。我想我已经很接近了,但我不知道我应该做些什么来让它发挥作用
highMax = max(readDF['Matching?'][i-11:i])
getDateMax = readDF['Matching?'].index(highMax)
if highMax < max(readDF['Matching?'][i-10:i+1]):
make_VarNames['Found'][i] = make_VarNames['Found'][i-1]
else:
make_VarNames['Found'][i] = readDF['Date'][getDateMax]
假设我有一个包含1000个单元格的列,我需要在单元格200和210中找到一个匹配项。然而,当前代码在整个列中查找33处的匹配项。但是,这不在我需要的范围内
谢谢你的帮助。谢谢
目前没有回答
相关问题 更多 >
编程相关推荐