aliyun / alibabacloud-odps-maxframe-client

Apache License 2.0
3 stars 1 forks source link

DataFrame.sort_values na_position param not work #15

Open snowljs opened 2 weeks ago

snowljs commented 2 weeks ago
df = md.DataFrame({                            
    'col1': ['A', 'A', 'B', np.nan, 'D', 'C'], 
    'col2': [2, 1, 9, 8, 7, 4],                
    'col3': [0, 1, 9, 4, 2, 3],                
})   
df.sort_values(by='col1', ascending=False, na_position='first').execute()

the returned result is

   col1  col2  col3
4     D     7     2
5     C     4     3
2     B     9     9
0     A     2     0
1     A     1     1
3  None     8     4

should be

    col1 col2 col3
3   NaN  8    4   
4   D    7    2   
5   C    4    3   
2   B    9    9   
0   A    2    0   
1   A    1    1