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

Install duckdb the default backend for ibis in the cudf.pandas integration tests #17972

Merged
merged 11 commits into from
Feb 15, 2025
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ dependencies:
packages:
- pip
- pip:
- ibis-framework[pandas]<10.0.0
- ibis-framework[duckdb]
test_hvplot:
common:
- output_types: conda
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import pandas as pd
import pytest

ibis.set_backend("pandas")

ibis.options.interactive = False


Expand Down Expand Up @@ -59,7 +57,7 @@ def ibis_table_num():
rng.integers(0, 100, (N, K)), columns=[f"val{x}" for x in np.arange(K)]
)
df["key"] = rng.choice(np.arange(10), N)
table = ibis.memtable(df, name="t")
table = ibis.memtable(df, name="u")
return table


Expand All @@ -72,12 +70,15 @@ def test_column_reductions(ibis_table_num_str, op):
@pytest.mark.parametrize("op", ["mean", "sum", "min", "max"])
def test_groupby_reductions(ibis_table_num_str, op):
t = ibis_table_num_str
return getattr(t.group_by("key").col1, op)().to_pandas()
return getattr(t.group_by("key").col1, "min")().order_by("key").to_pandas()


@pytest.mark.parametrize("op", ELEMENTWISE_UFUNCS)
def test_mutate_ufunc(ibis_table_num_str, op):
t = ibis_table_num_str
if op == "log":
# avoid duckdb log of 0 error
t = t.mutate(col1=t.col1 + 1)
expr = getattr(t.col1, op)()
return t.mutate(col1_sin=expr).to_pandas()

Expand Down Expand Up @@ -116,7 +117,10 @@ def test_notin(ibis_table_num_str):
def test_window(ibis_table_num_str):
t = ibis_table_num_str
return (
t.group_by("key").mutate(demeaned=t.col1 - t.col1.mean()).to_pandas()
t.group_by("key")
.mutate(demeaned=t.col1 - t.col1.mean())
.order_by("key")
.to_pandas()
)


Expand Down
Loading