Skip to content

Commit 64bdf76

Browse files
chore: stop using deprecated ibis relabel method (#297)
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/python-bigquery-dataframes/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕
1 parent 7cbc2b0 commit 64bdf76

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bigframes/core/compile/compiled.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,9 @@ def _to_ibis_expr(
346346
table = table.filter(base_table[PREDICATE_COLUMN])
347347
table = table.drop(*columns_to_drop)
348348
if col_id_overrides:
349-
table = table.relabel(col_id_overrides)
349+
table = table.rename(
350+
{value: key for key, value in col_id_overrides.items()}
351+
)
350352
if fraction is not None:
351353
table = table.filter(ibis.random() < ibis.literal(fraction))
352354
return table
@@ -1194,7 +1196,9 @@ def _to_ibis_expr(
11941196
table = table.filter(base_table[PREDICATE_COLUMN])
11951197
table = table.drop(*columns_to_drop)
11961198
if col_id_overrides:
1197-
table = table.relabel(col_id_overrides)
1199+
table = table.rename(
1200+
{value: key for key, value in col_id_overrides.items()}
1201+
)
11981202
if fraction is not None:
11991203
table = table.filter(ibis.random() < ibis.literal(fraction))
12001204
return table

0 commit comments

Comments
 (0)