From 6dc6cd1142dfde35a6a77dd8b209dfa592d19da3 Mon Sep 17 00:00:00 2001 From: lajohn4747 Date: Tue, 31 Oct 2023 10:34:00 -0500 Subject: [PATCH] remove unneeded assert --- sdmetrics/reports/multi_table/_properties/base.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sdmetrics/reports/multi_table/_properties/base.py b/sdmetrics/reports/multi_table/_properties/base.py index 29f3a971..6f0a2fcf 100644 --- a/sdmetrics/reports/multi_table/_properties/base.py +++ b/sdmetrics/reports/multi_table/_properties/base.py @@ -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()