meerkat.sort¶

sort(data: meerkat.dataframe.DataFrame, by: Union[str, List[str]], ascending: Union[bool, List[bool]] = True, kind: str = 'quicksort') meerkat.dataframe.DataFrame[source]¶

Sort a DataFrame or Column. If a DataFrame, sort by the values in the specified columns. Similar to sort_values in pandas.

Parameters
  • data (Union[DataFrame, AbstractColumn]) – DataFrame or Column to sort.

  • by (Union[str, List[str]]) – The columns to sort by. Ignored if data is a Column.

  • ascending (Union[bool, List[bool]]) – Whether to sort in ascending or descending order. If a list, must be the same length as by.Defaults to True.

  • kind (str) – The kind of sort to use. Defaults to ‘quicksort’. Options include ‘quicksort’, ‘mergesort’, ‘heapsort’, ‘stable’.

Returns

A sorted view of DataFrame.

Return type

DataFrame