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.v2
some time in 2025The main things I'd like to achieve are:
Series
and 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_by
argument 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.v1
should remain unaffectedTentative date: some time in 2025
Why remove support for the dataframe interchange protocol?
Outstanding items
Breaking changes:
eager_or_interchange_only
fromfrom_native
group_by(...).agg
should aggregatenw.all()
#1780 (to make sure that addressing it doesn't require further API breaks)nw.LazyFrame
really need.clone
? feat!: require at least one expression be passed to lazyframe select and lazyframe.with_columns, remove lazyframe.clone #2206native_namespace
->backend
in IO functions Deprecatenative_namespace
in favour ofbackend
in IO functions #1888LazyFrame.gather_every
pd.Categorical
get mapped tonw.Enum
? feat: letnw.Enum
accept categories, map pandas ordered categorical to Enum (only in main namespace, not stable.v1) #21920
ornull
?LazyFrame.with_row_index
: [Enh]: AllowLazyFrame.with_row_index(..., order_by=...)
#2307concat(how='horizontal')
for lazyframes #2340IO functions API: io functions for v2 #2116utils
public/private: api: move non-public parts ofutils.py
to private module(s) #2634is_*_dataframe
feat: raise informative error or warning when passing narwhals object tonw.dependencies.is_*_dataframe
#1437get_level
from main namespaceany_horizontal
andall_horizontal
with Polars' future behaviour? #2678LazyFrame.schema
shouldLazyFrame.schema
issue a performance warning? #2783not considered blockers, as they don't change backcompat:
IO functions API: io functions for v2 #2116keep
argument inmode
feat: add optionalkeep
argument toExpr.mode
#1793Beta Was this translation helpful? Give feedback.
All reactions