-
Notifications
You must be signed in to change notification settings - Fork 59
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
Use Narwhals to support Polars and Modin DataFrames #341
base: main
Are you sure you want to change the base?
Conversation
Thank you for making this pull request. Did you know? You can try it on Binder: . Also, the version of ITables developed in this PR can be installed with
(this requires |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #341 +/- ##
==========================================
- Coverage 94.76% 91.95% -2.81%
==========================================
Files 24 26 +2
Lines 1280 1343 +63
==========================================
+ Hits 1213 1235 +22
- Misses 67 108 +41 ☔ View full report in Codecov by Sentry. |
d4d0ba9
to
c4a8503
Compare
Remove support for Python 3.7
as we use narwhals instead
d226035
to
ae00927
Compare
@DeaMariaLeon @MarcoGorelli I hope to finalize this PR in the coming days (sorry for not being able to find time for that earlier!) I plan to
Footnotes
|
I can't seem to be able to use Narwhals for rendering Ibis dataframes - at least I can't call t = ibis.table(dict(one="string", two="float", three="int32"), name="my_data") or t = ibis.memtable(pd.DataFrame(
[["a", 1, 2], ["b", 3, 4]],
columns=["one", "two", "three"],
index=[5, 6],
), name="t") The error I get is the following:
|
hey @mwouts - at the moment, our support for Ibis is only "interchange-level" (https://narwhals-dev.github.io/narwhals/extending/#interchange-only-support). This means you can only do the following:
The plan is to implement lazy support for them relatively soon in early 2025: narwhals-dev/narwhals#1657. We've got something cooking for PySpark and DuckDB, but we'll do the same for Ibis too. However, even once we have Ibis supported, calling What you could do now (and this is what Marimo do) is:
and then continue with the rest of the logic |
This PR add tests for Modin dataframes. It is on top of @DeaMariaLeon's PR to add support for more DataFrame types using Narwhals at #339 .
From this quick experiment I would say that the
nbytes
function (estimate the size of the dataframe in bytes) and thedownsample
functions (keep left and right most columns, top and bottom rows) could benefit a bit more from Narwhals.