2013-05-06 12 views

Odpowiedz

13
In [28]: s = pd.Series([20, 10, 30], ['c', 'a', 'b']) 

In [29]: s 
Out[29]: 
c 20 
a 10 
b 30 
dtype: int64 

Sortowanie indeksu

In [30]: s.sort_index(ascending=False) 
Out[30]: 
c 20 
b 30 
a 10 
dtype: int64 

sortowania na wartościach

In [31]: s.sort() 

In [32]: s[::-1] 
Out[32]: 
b 30 
c 20 
a 10 
dtype: int64 
Powiązane problemy