Skip to content

Commit

Permalink
remove unneeded assert
Browse files Browse the repository at this point in the history
  • Loading branch information
lajohn4747 committed Oct 31, 2023
1 parent d0ab31b commit 6dc6cd1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sdmetrics/reports/multi_table/_properties/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,11 @@ def _compute_average(self):
"""Average the scores for each column."""
is_dataframe = isinstance(self.details, pd.DataFrame)
has_score_column = 'Score' in self.details.columns
assert_message = "The property details must be a DataFrame with a 'Score' column."
assert_message = "The property details must be in a DataFrame with a 'Score' column."

assert is_dataframe, assert_message
if not has_score_column:
return np.nan
assert is_dataframe, assert_message
assert has_score_column, assert_message

return self.details['Score'].mean()

Expand Down

0 comments on commit 6dc6cd1

Please sign in to comment.