【发布时间】:2020-08-01 13:21:54
【问题描述】:
我正在学习系列中的 python/pandas 属性。我可以让它显示最小值和最大值,但我想显示最小值和最大值索引值,我收到一条错误消息。
google.min()
49.95
google.max()
782.22
google.idmin()
AttributeError Traceback(最近 最后调用) ----> 1 google.idmin(True)
/opt/anaconda3/envs/pandas_playground/lib/python3.8/site-packages/pandas/core/generic.py 在 getattr(self, name) 5272 如果 self._info_axis._can_hold_identifiers_and_holds_name(名称):5273
返回自我[姓名] -> 5274 返回对象。getattribute(self, name) 5275 5276 def setattr(self, name: str, value) -> None:AttributeError: 'Series' 对象没有属性 'idmin'
【问题讨论】:
-
你运行的是什么版本的熊猫?你能发布这个
print(pd.__version__)的结果吗 -
1.0.3 我需要更新一些东西吗?
标签: python pandas attributes