Skip to content
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

feat: completely refactor alias tracking and support nw.all, nw.nth, and selectors across the API #1866

Merged
merged 43 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e24da74
chore: skip ibis tests if duckdb not installed
MarcoGorelli Jan 24, 2025
0ff19a6
__array__ defaults
MarcoGorelli Jan 24, 2025
14e9eb4
simpler fix
MarcoGorelli Jan 24, 2025
eea221a
wip
MarcoGorelli Jan 24, 2025
9a958be
wip
MarcoGorelli Jan 24, 2025
6d2e95d
wip
MarcoGorelli Jan 24, 2025
2ce8f68
wip
MarcoGorelli Jan 24, 2025
ef3be7e
rename
MarcoGorelli Jan 24, 2025
6793e3a
rev
MarcoGorelli Jan 24, 2025
26bdb90
fix horizontal functions
MarcoGorelli Jan 25, 2025
6279653
fixup dask selectors
MarcoGorelli Jan 25, 2025
f789e38
this is amazing
MarcoGorelli Jan 25, 2025
91d9987
start fixing pyspark
MarcoGorelli Jan 25, 2025
ae92462
wip
MarcoGorelli Jan 25, 2025
6fbd537
hey everythingn passed!
MarcoGorelli Jan 25, 2025
907e450
clean up
MarcoGorelli Jan 25, 2025
936adea
Merge remote-tracking branch 'upstream/main' into the-big-dask-refactor
MarcoGorelli Jan 25, 2025
0a794bd
wait, duckdb is passing now?
MarcoGorelli Jan 25, 2025
7b0fda2
wait, duckdb is passing now?
MarcoGorelli Jan 25, 2025
945a5b9
wait, duckdb is passing now?
MarcoGorelli Jan 25, 2025
38dc3bc
pyarrow, getting there!
MarcoGorelli Jan 25, 2025
02c9ab2
fixing pandas
MarcoGorelli Jan 25, 2025
e65796a
come on getting there
MarcoGorelli Jan 25, 2025
a37d088
come one, almost there
MarcoGorelli Jan 25, 2025
83351d5
come one, almost there
MarcoGorelli Jan 25, 2025
6e40a89
one more
MarcoGorelli Jan 25, 2025
e86792b
restore dask
MarcoGorelli Jan 25, 2025
5ae54a8
clean up
MarcoGorelli Jan 25, 2025
265308b
remove more stuff
MarcoGorelli Jan 25, 2025
5e43f7a
raise NotImplementedError in `over` in some cases for now
MarcoGorelli Jan 26, 2025
31c84e6
Merge remote-tracking branch 'upstream/main' into the-big-dask-refactor
MarcoGorelli Jan 26, 2025
f3c5166
duckdb fixup
MarcoGorelli Jan 26, 2025
9f7aa3b
outdated comment
MarcoGorelli Jan 26, 2025
37f6315
loudly raise for over with key overlap
MarcoGorelli Jan 26, 2025
c3dc751
better types in selectors.
MarcoGorelli Jan 26, 2025
c5a22a2
fixup
MarcoGorelli Jan 26, 2025
7753490
Merge remote-tracking branch 'upstream/main' into the-big-dask-refactor
MarcoGorelli Jan 26, 2025
7bca332
versions compat
MarcoGorelli Jan 26, 2025
6ea2745
fixup
MarcoGorelli Jan 26, 2025
e2d9448
coverage
MarcoGorelli Jan 26, 2025
02680c1
fixup
MarcoGorelli Jan 26, 2025
ac4681c
comprehensions
MarcoGorelli Jan 26, 2025
613966f
redundat comment
MarcoGorelli Jan 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
come one, almost there
  • Loading branch information
MarcoGorelli committed Jan 25, 2025
commit 83351d59e3a6d682e359400942e2d24b4281e997
2 changes: 1 addition & 1 deletion narwhals/_arrow/group_by.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def agg(self: Self, *exprs: ArrowExpr) -> ArrowDataFrame:
msg = "Safety assertion failed, please report a bug to https://github.com/narwhals-dev/narwhals/issues"
raise AssertionError(msg)

new_column_names.append(output_names[0])
new_column_names.append(aliases[0])
expected_pyarrow_column_names.append(f"{self._keys[0]}_count")
aggs.append((self._keys[0], "count", pc.CountOptions(mode="all")))

Expand Down
2 changes: 1 addition & 1 deletion narwhals/_pandas_like/group_by.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def agg(self: Self, *exprs: PandasLikeExpr) -> PandasLikeDataFrame: # noqa: PLR
function_name = POLARS_TO_PANDAS_AGGREGATIONS.get(
expr._function_name, expr._function_name
)
for alias in output_names:
for alias in aliases:
expected_old_names.append(f"{self._keys[0]}_{function_name}")
simple_aggs[self._keys[0]].append(function_name)
simple_agg_new_names.append(alias)
Expand Down