pandas 0.9.0 documentation

pandas.DataFrame.sort

DataFrame.sort(columns=None, column=None, axis=0, ascending=True, inplace=False)

Sort DataFrame either by labels (along either axis) or by the values in column(s)

Parameters :

columns : 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

axis : {0, 1}

Sort index/rows versus columns

inplace : boolean, default False

Sort the DataFrame without creating a new instance

Returns :

sorted : DataFrame