Skip to content

Commit

Permalink
Fixed display issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethshsu committed Mar 27, 2024
1 parent d06ac9b commit 578b237
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions chainladder/core/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ class TriangleDisplay:
def __repr__(self):
try:
self.values

if (self.values.shape[0], self.values.shape[1]) == (1, 1):
data = self._repr_format()
return data.to_string()
else:
return self._summary_frame().__repr__()

except:
print("Triangle is empty")
return

if (self.values.shape[0], self.values.shape[1]) == (1, 1):
data = self._repr_format()
return data.to_string()
else:
return self._summary_frame().__repr__()

def _summary_frame(self):
return pd.Series(
Expand Down

0 comments on commit 578b237

Please sign in to comment.