我0.19.1在Python 3上使用Pandas .我在这些代码行上收到警告.我试图得到一个包含所有行数,其中字符串列表Peter出现在列Unnamed: 5.
df = pd.read_excel(xls_path)
myRows = df[df['Unnamed: 5'] == 'Peter'].index.tolist()
Run Code Online (Sandbox Code Playgroud)
警告:
"\Python36\lib\site-packages\pandas\core\ops.py:792: FutureWarning: elementwise
comparison failed; returning scalar, but in the future will perform
elementwise comparison
result = getattr(x, name)(y)"
Run Code Online (Sandbox Code Playgroud)
什么是FutureWarning,我应该忽略它,因为它似乎有效.