Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(server/pandas): Preserve row order in rank step sort #1879

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

lukapeschke
Copy link
Contributor

No description provided.

@lukapeschke lukapeschke added bug Something isn't working need review py pandas Python pandas backend python Pull requests that update Python code labels Sep 7, 2023
@lukapeschke lukapeschke self-assigned this Sep 7, 2023
@render
Copy link

render bot commented Sep 7, 2023

# NOTE: Sorting on a temporary index column as well in order to preserve the order
.reset_index()
.sort_values(by=[new_column_name, "index"])
.drop(["index"], axis=1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ça peut être un souci si on a déjà une colonne "index" dans le dataframe, on peut ptêt spécifier un .reset_index(names="__tmp_index__") ou qqch dans le genre ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes bien v je fais ça 💡

Copy link
Member

@fspot fspot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

juste une petite remarque mais sinon 👌

Signed-off-by: Luka Peschke <[email protected]>
@lukapeschke lukapeschke merged commit 1b28c8e into master Sep 7, 2023
@lukapeschke lukapeschke deleted the fix-flaky-rank branch September 7, 2023 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need review py pandas Python pandas backend python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants