Skip to content

Commit

Permalink
resolves #61 groupby not consistent with pandas
Browse files Browse the repository at this point in the history
  • Loading branch information
jbogaardt committed Mar 7, 2020
1 parent 024d54a commit 0c66fbf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions chainladder/core/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ def groupby(self, by, *args, **kwargs):
-------
GroupBy object (pandas or Triangle)
"""
if self.shape[:2] == (1, 1):
try:
return self.to_frame().groupby(*args, **kwargs)
return TriangleGroupBy(self, by)
except:
return TriangleGroupBy(self, by)

def append(self, other):
""" Append rows of other to the end of caller, returning a new object.
Expand Down

0 comments on commit 0c66fbf

Please sign in to comment.