Support for Polars and other dataframes#482
Conversation
|
I'm using Ruff for linting and formatting, which complains about some best practices not being followed. Mostly unused imports, isort complains about sorting of imports, but also that Should I create a new issue and pull request with ruff as formatter and use auto fix to remove those smaller "issues"? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #482 +/- ##
==========================================
+ Coverage 81.70% 81.73% +0.02%
==========================================
Files 80 80
Lines 4712 4719 +7
Branches 806 807 +1
==========================================
+ Hits 3850 3857 +7
Misses 659 659
Partials 203 203
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Thanks for these updates @johalnes ! |
Sure! |
Overview
As discussed in #474, added Python dataframe interchange protocol.
This open up the possibility for using the chain ladder package with multiple different dataframe packages, like Spark, Polars, Vaex etc.
Behind the scene it uses the "new" pandas function
pd.api.interchange.from_dataframe(data)that magically converts a dataframe to the correct types and other dataframe adjustments to make it pandas compatible.Testing
Tested with the example from issue #474 and added test to ensure same result with polars and pandas