api: plan for narwhals.stable.v2
#1657
MarcoGorelli
announced in
Announcements
Replies: 6 comments 14 replies
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I think we can aim for
narwhals.stable.v2some time in 2025The main things I'd like to achieve are:
Seriesand have a defined row order (pandas, polars.DataFrame, pyarrow.Table, modin.DataFrame, cudf.DataFrame)collect, adding/removing/subsetting columns, filtering rows. Initially, at least, row-order-dependent operations (such asnw.cum_sum) will be left out. This will include Polars.LazyFrame, DuckDBPyRelation, pyspark.DataFrame, ibis.Table, dask.DataFrame. Later we can add anorder_byargument to these functions which will become required when working with nw.LazyframeCandidate changes:
from_native. It will get simpler once we remove interchange-level things, but it's still fairly complicated. Not sure how much I like it to be completely honest, but I also haven't come up with anything betterUsage of
narwhals.stable.v1should remain unaffectedTentative date: some time in 2025
Why remove support for the dataframe interchange protocol?
Outstanding items
Breaking changes:
eager_or_interchange_onlyfromfrom_nativegroup_by(...).aggshould aggregatenw.all()#1780 (to make sure that addressing it doesn't require further API breaks)nw.LazyFramereally need.clone? feat!: require at least one expression be passed to lazyframe select and lazyframe.with_columns, remove lazyframe.clone #2206native_namespace->backendin IO functions Deprecatenative_namespacein favour ofbackendin IO functions #1888LazyFrame.gather_everypd.Categoricalget mapped tonw.Enum? feat: letnw.Enumaccept categories, map pandas ordered categorical to Enum (only in main namespace, not stable.v1) #21920ornull?LazyFrame.with_row_index: [Enh]: AllowLazyFrame.with_row_index(..., order_by=...)#2307concat(how='horizontal')for lazyframes #2340IO functions API: io functions for v2 #2116utilspublic/private: api: move non-public parts ofutils.pyto private module(s) #2634is_*_dataframefeat: raise informative error or warning when passing narwhals object tonw.dependencies.is_*_dataframe#1437get_levelfrom main namespaceany_horizontalandall_horizontalwith Polars' future behaviour? #2678LazyFrame.schemashouldLazyFrame.schemaissue a performance warning? #2783not considered blockers, as they don't change backcompat:
IO functions API: io functions for v2 #2116keepargument inmodefeat: add optionalkeepargument toExpr.mode#1793Beta Was this translation helpful? Give feedback.
All reactions