我不确定这里出了什么问题。我有一个数据框:
>DFexample.columns
>['url','weight1','weight2']
我试图按weight2
:
>DFexample.orderBy(DFexample.weight2.desc()).show(4)
>-----+--------+-------------------+
| url |weight1 | weight2 |
+-----+--------+-------------------+
| x |0 | 9.800000342342E-4 |
| x2 |1 | 2.432432432 |
| x3 | 1.2 | 2.134234234 |
| x4 | 1.32 | 1.232324 |
+-----+--------+-------------------+
除了第一个值之外,似乎所有东西都是有序的。出于什么原因会发生这种情况?