Skip to content

Commit

Permalink
Fix Ensemble.batch(on=None/str)
Browse files Browse the repository at this point in the history
Closes #202
  • Loading branch information
hombit committed Aug 24, 2023
1 parent b675119 commit c6f367c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tape/ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,8 @@ def batch(self, func, *args, meta=None, use_map=True, compute=True, on=None, **k

if on is None:
on = self._id_col # Default grouping is by id_col
if isinstance(on, str):
on = [on] # Convert to list if only one column is passed

# Handle object columns to group on
source_cols = list(self._source.columns)
Expand Down

0 comments on commit c6f367c

Please sign in to comment.