feat: Raw api polars integration#2678
Open
christoffer-hk wants to merge 8 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds Polars DataFrame support to the raw rows API and data classes. The review feedback highlights several instances where unpacking row columns could raise a TypeError if the columns are None, suggesting defensive unpacking with **(columns or {}).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2678 +/- ##
==========================================
- Coverage 93.65% 93.65% -0.01%
==========================================
Files 498 498
Lines 50342 50460 +118
==========================================
+ Hits 47148 47258 +110
- Misses 3194 3202 +8
🚀 New features to boost your workflow:
|
Contributor
Author
|
A couple comments from myself.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Started on an integration with Polars, as an alternative to Pandas. Beginning with RAW rows (RowCore and RowListCore) and a
retrieve_polars_dataframefunction in the RawRowsAPI. Currently implemented the bare minimum to have mostly feature parity with how we integrate with Pandas.This only scratches the surface with what is technically possible to do with Polars. I believe there is a lot of potential in using Polars, especially now in version 8> with running things async. A lot of cool topics are mentioned here in a comparison written by Polars https://docs.pola.rs/user-guide/migration/pandas/ .
Checklist:
If a new method has been added it should be referenced in cognite.rst in order to generate docs based on its docstring.