Skip to content
Merged
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
19 changes: 19 additions & 0 deletions python/ray/dataframe/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,25 @@ def __init__(self, df, by, axis, level, as_index, sort, group_keys,
else:
self._grouped_partitions = [df._row_partitions]

def __getattr__(self, key):
"""Afer regular attribute access, looks up the name in the columns

Args:
key (str): Attribute name.

Returns:
The value of the attribute.
"""
try:
return object.__getattribute__(self, key)
except AttributeError as e:
if key in self._columns:
raise NotImplementedError(
"SeriesGroupBy is not implemented."
"To contribute to Pandas on Ray, please visit "
"github.com/ray-project/ray.")
raise e

@property
def _iter(self):
from .dataframe import DataFrame
Expand Down