Skip to content

Commit

Permalink
Edge case not to throw a ValueError when no columns logged
Browse files Browse the repository at this point in the history
  • Loading branch information
pecop2 committed Jan 27, 2022
1 parent a6cc7db commit 886837a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/whylogs/core/datasetprofile.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ def session_timestamp_ms(self):

@property
def total_row_number(self):
return max([col_prof.counters.count for col_prof in self.columns.values()])
column_counts = [col_prof.counters.count for col_prof in self.columns.values()] if len(self.columns) else [0]
return max(column_counts)

def add_output_field(self, field: Union[str, List[str]]):
if self.model_profile is None:
Expand Down

0 comments on commit 886837a

Please sign in to comment.