bigframes.pandas.DatetimeIndex.sort_values#
- DatetimeIndex.sort_values(*,inplace:bool=False,ascending:bool=True,na_position:__builtins__.str='last')→Index#
Return a sorted copy of the index.
Return a sorted copy of the index, and optionally return the indicesthat sorted the index itself.
Examples:
>>>idx=bpd.Index([10,100,1,1000])>>>idxIndex([10, 100, 1, 1000], dtype='Int64')
Sort values in ascending order (default behavior).
>>>idx.sort_values()Index([1, 10, 100, 1000], dtype='Int64')
- Parameters:
ascending (bool,default True) – Should the index values be sorted in an ascending order.
na_position ({'first' or'last'},default 'last') – Argument ‘first’ puts NaNs at the beginning, ‘last’ puts NaNs atthe end.
- Returns:
Sorted copy of the index.
- Return type:
- Raises:
ValueError – If
no_positionis not one offirstorlast.
On this page