我的输出结果看起来像这样:
binnedb Proba-A Proba-B Esperance-A Esperance-B
0 (0.0101, 0.0202] 0.547826 0.539130 0.007817 0.007693
1 (0.0302, 0.0402] 0.547826 0.539130 0.005963 0.005854
2 (0.0201, 0.0302] 0.547826 0.539130 0.008360 0.008227
我希望你能帮我完成一项任务,即按照binnedb列的升序对df进行排序。如果您不理解我的问题,请告诉我。这是我迄今为止尝试过的代码:
df.sort_values(by=['binnedb'], ascending = False)
但是它并没有起作用...谢谢!
type(df['binnedb'])
是什么? - cs95bins = np.linspace(0, 1, num=100)
- Viktor.wdf['binnedb'].cat.codes
会起作用还是会报错? - cs95