Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 2 additions & 4 deletions bigframes/core/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2025,7 +2025,7 @@ def isin(self, other: Block):
assert len(other.value_columns) == 1
unique_other_values = other.expr.select_columns(
[other.value_columns[0]]
).aggregate((), by_column_ids=(other.value_columns[0],))
).aggregate((), by_column_ids=(other.value_columns[0],), dropna=False)
block = self
# for each original column, join with other
for i in range(len(self.value_columns)):
Expand All @@ -2039,9 +2039,7 @@ def _isin_inner(self: Block, col: str, unique_values: core.ArrayValue) -> Block:
expr, (l_map, r_map) = self._expr.relational_join(
unique_values, ((col, unique_values.column_ids[0]),), type="left"
)
expr, matches = expr.project_to_id(
ops.eq_op.as_expr(ex.const(True), r_map[const])
)
expr, matches = expr.project_to_id(ops.notnull_op.as_expr(r_map[const]))

new_index_cols = tuple(l_map[idx_col] for idx_col in self.index_columns)
new_value_cols = tuple(
Expand Down
2 changes: 1 addition & 1 deletion bigframes/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ def nsmallest(self, n: int = 5, keep: str = "first") -> Series:

def isin(self, values) -> "Series" | None:
if isinstance(values, (Series,)):
self._block.isin(values._block)
return Series(self._block.isin(values._block))
if not _is_list_like(values):
raise TypeError(
"only list-like objects are allowed to be passed to "
Expand Down