bigframes.pandas.Index.sort_values#
- Index.sort_values(*, inplace: bool = False, ascending: bool = True, na_position: __builtins__.str = 'last') Index[source]#
Return a sorted copy of the index.
Return a sorted copy of the index, and optionally return the indices that sorted the index itself.
Examples:
>>> idx = bpd.Index([10, 100, 1, 1000]) >>> idx Index([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 at the end.
- Returns:
Sorted copy of the index.
- Return type:
- Raises:
ValueError – If
no_positionis not one offirstorlast.