-
Notifications
You must be signed in to change notification settings - Fork 5
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
Sort DataFrames inplace. #597
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ruff claims:
Further, in many cases, inplace=True does not provide a performance benefit, as pandas will often copy DataFrames in the background.
Would be good to benchmark if that actually improve things.
Can confirm that this no longer triggers validation on write. |
So the tables are subheadings of the node types.
e5bf8ab
to
dc0c288
Compare
Turns out the Ubuntu CI failure was due to a missing custom sort method. Brought them all up to date with our docs in dc0c288. @evetion already mentioned that the sort algorithm on Linux could be slightly different, and we just luckily ended up with a sorted GeoPackage on Windows. On top of that, we sort data when reading it into the core as well, so not sorting in Python should not lead to test failures. But those were similarly outdated, fixed in fe64269. |
Fixes the performance of saving a Ribasim model in Python.
When we sorted, we assigned the returned dataframe to our model, triggering validation.