为什么会出现此错误:“ []缺少标签”?

时间:2019-05-27 19:19:00

标签: python pandas error-handling

我跑步:

holder = df.age
print(df.no_show[holder].mean())

并得到此错误:

Passing list-likes to .loc or [] with any missing label will raise
KeyError in the future, you can use .reindex() as an alternative.

这是针对我试图绘制df.agedf.no_show的影响的项目。

我希望有一个数字,并且该数字在其前面显示有错误消息。如何摆脱错误?

谢谢!

0 个答案:

没有答案
相关问题