Skip to content
This repository was archived by the owner on May 7, 2026. It is now read-only.
Merged
Changes from 1 commit
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
9 changes: 6 additions & 3 deletions bigframes/core/groupby/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,12 @@ def __getitem__(
keys = list(key)
else:
keys = [key]
columns = [
col_id for col_id, label in self._col_id_labels.items() if label in keys
]

for col_id, label in self._col_id_labels.items():
if label in keys:
columns = [col_id]
Comment thread
arwas11 marked this conversation as resolved.
Outdated
else:
raise KeyError(f"Columns not found: {str(keys)[1:-1]}")

if len(columns) > 1 or (not self._as_index):
return DataFrameGroupBy(
Expand Down