Skip to content

Commit

Permalink
Update sort_first_koalas.py
Browse files Browse the repository at this point in the history
  • Loading branch information
svittoz authored Apr 17, 2024
1 parent ebdb78d commit 2bb5071
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eds_scikit/utils/sort_first_koalas.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
def sort_values_first_koalas(
dataframe: DataFrame, by_cols: List[str], cols: List[str], ascending: bool = True
) -> DataFrame:
"""Replacement for dataframe.sort_values(cols).groupby(by_cols).first()
"""Use this function to obtain in koalas the same ouput as dataframe.sort_values(cols).groupby(by_cols).first() in pandas.
To get a deterministic first, provide an id column of your dataframe as the last element of cols.
If you want the output to be deterministic, provide an id column of your dataframe as the last element of variable cols.
Parameters
----------
Expand Down

0 comments on commit 2bb5071

Please sign in to comment.