我有一个名为df_head
的熊猫数据框(仅此而已),我已经将'headDirection'
分为60个箱,如下所示:
headDirection spiketrain bins
0 334.983107 0 (330.0, 336.0]
1 335.865142 0 (330.0, 336.0]
2 336.713935 0 (336.0, 342.0]
3 337.530979 0 (336.0, 342.0]
4 338.317708 0 (336.0, 342.0]
5 339.075498 0 (336.0, 342.0]
6 339.805666 0 (336.0, 342.0]
7 340.509469 0 (336.0, 342.0]
是否有一种方法基于对各自df_head['spiketrain']
值的装箱排序对df_head['headDireaction']
值进行排序?