我有一个数据框的形式: user accuracy latitude longitude timestamp0 5573502c150000c10136e51b 29.942 -8.658122 -45.700106 14341276708361 5573502c150000c10136e51b 30.000 -8.658068 -45.700127 14341277308892 5573502c150000c10136e51b 30.000 -8.658068 -45.700127 14341277909113 5573502c150000c10136e51b 30.000 -8.658057 -45.700123 14341278589154 5573502c150000c10136e51b 39.000 -8.658072 -45.700108 14341279189485 5573502c150000c10136e51b 31.876 -8.658100 -45.700107 14341280210626 5573502c150000c10136e51b 30.048 -8.658116 -45.700140 14341281514677 5573502c150000c10136e51b 30.473 -8.658118 -45.700097 14341282770978 5573502c150000c10136e51b 55.500 -6.658087 -45.700138 14341401056189 5573502c150000c10136e51b 55.500 -6.658087 -45.700138 143414016568510 5573502c150000c10136e51b 30.000 -6.658057 -45.700130 143414022589811 5573502c150000c10136e51b 30.000 -6.658057 -45.700130 143414028595212 5573502c150000c10136e51b 30.000 -7.658084 -45.700113 143414034616613 5573502c150000c10136e51b 36.000 -7.658051 -45.700138 143414040621414 5573502c150000c10136e51b 36.000 -5.658051 -45.700138 143414046624015 5573502c150000c10136e51b 32.908 -5.658091 -45.700097 143414052627816 5573502c150000c10136e51b 32.908 -5.658091 -45.700097 143414058632517 5573502c150000c10136e51b 34.009 -5.658075 -45.700119 143414064636318 5573502c150000c10136e51b 30.000 -5.658058 -45.700118 143414070640919 5573502c150000c10136e51b 30.000 -5.658058 -45.700118 1434140766455我想按天对数据框进行分组,然后将每天的记录附加到不同的列表中。所以我有:DFList = [group[1] for group in df.groupby(df.index.day)]print DFList但我收到一个错误:AttributeError: 'RangeIndex' 对象没有属性 'day'谁能知道如何解决这个问题?
添加回答
举报
0/150
提交
取消