Choice of sorting algorithm. See also numpy.sort() for more information. mergesort and stable are the only stable algorithms. For DataFrames, this option is only applied when sorting on a single column or label.
na_position: {‘first’, ‘last’}, default ‘last’
Puts NaNs at the beginning if first; last puts NaNs at the end. Not implemented for MultiIndex.
sort_remaining: bool, default True
If True and sorting by level and index is multilevel, sort by other levels too (in order) after sorting by specified level.
ignore_index: bool, default False
If True, the resulting axis will be labeled 0, 1, …, n - 1.
key: callable, optional
If not None, apply the key function to the index values before sorting. This is similar to the key argument in the builtin sorted() function, with the notable difference that this key function should be vectorized. It should expect an Index and return an Index of the same shape. For MultiIndex inputs, the key is applied per level.
Returns:
DataFrame or None
The original DataFrame sorted by the labels or None if inplace=True.