Adds stub of NarwhalsAdapter#998
Merged
Merged
Conversation
skrawcz
marked this pull request as ready for review
July 1, 2024 18:33
skrawcz
force-pushed
the
narwhals_example
branch
2 times, most recently
from
July 2, 2024 00:55
2c21576 to
de1af35
Compare
Assumptions narwhals has (I believe): 1. you can only have one "backend"; you can't mix & match. That means you can't load some in pandas, and some in polars I don't think. 2. This change uses the narwhals decorator. This assumes that non pandas/polars stuff would be left alone by it. If not, we could just skip adding it if we don't detect a type. Otherwise probably need a better example from narhwals.
This makes the user choose what the return type is and then requires them to nest it in the narwhals result builder that just converts the outputs to the backend that is being used.
First version of narwhals support.
Adds README and notebook so that people can run this example easily. Also adds circleci tests.
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.
The purpose of this adapter is to showcase how you can write
transforms that are agnostic of the dataframe type.
Notes
Assumptions narwhals has (I believe):
Changes
How I tested this
Checklist