bigframes.pandas.DataFrame.sort_index#
- DataFrame.sort_index(*,ascending:bool=True,inplace:Literal[False]=False,na_position:Literal['first','last']='last')→DataFrame[source]#
- DataFrame.sort_index(*,ascending:bool=True,inplace:Literal[True]=False,na_position:Literal['first','last']='last')→None
Sort object by labels (along an axis).
- Parameters:
axis ({0 or'index',1 or'columns'},default 0) – The axis along which to sort. The value 0 identifies the rows,and 1 identifies the columns.
ascending (bool,default True) – Sort ascending vs. descending.
inplace (bool,default False) – Whether to modify the DataFrame rather than creating a new one.
na_position ({'first','last'},default 'last') – Puts NaNs at the beginning iffirst;last puts NaNs at the end.Not implemented for MultiIndex.
- Returns:
DataFrame with sorted values or None if inplace=True.
- Return type:
- Raises:
ValueError – If value of
na_positionis not one offirstorlast.ValueError – If length of
ascendingdose not equal length ofby.
On this page