我正在学习系列中的python/panda属性。我可以让它显示最小值和最大值,但我想显示最小和最大索引值,我收到了一条错误消息。
google.min()
49.95
google.max()
782.22
google.idmin()
AttributeError追溯(最新最后一次通话(---->1 google.idmin(True(
/opt/anconda3/envs/pandas_playground/lib/python3.8/site-packages/pandas/core/generic.py在getattr(self,name(5272中,如果自我_info_axis_can_hold_identifiers_and_holds_name(name(:5273
返回self[name]->5274返回对象getattribute(self,name(5275 5276 defsetattrAttributeError:"Series"对象没有属性"idmin">
经过一番搜索,我发现我只是使用了错误的方法。
idxmin和idxmax运行良好。
google.idxmax()
3011
google.idxmin()
11