pandas.DataFrame.sort_index¶
- DataFrame.sort_index(axis=0, by=None, ascending=True)¶
Sort DataFrame either by labels (along either axis) or by the values in a column
Parameters : axis : {0, 1}
Sort index/rows versus columns
by : object
Column name(s) in frame. Accepts a column name or a list or tuple for a nested sort.
ascending : boolean, default True
Sort ascending vs. descending
Returns : sorted : DataFrame