From daf604bcd21c92367a0ec71910eed82fbd307ea3 Mon Sep 17 00:00:00 2001 From: Andrew Li Date: Thu, 8 Feb 2024 16:04:34 -0600 Subject: [PATCH] remove unneeded casting --- .../profilers/numerical_column_stats.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/dataprofiler/profilers/numerical_column_stats.py b/dataprofiler/profilers/numerical_column_stats.py index 3f5f12f4..74c24e21 100644 --- a/dataprofiler/profilers/numerical_column_stats.py +++ b/dataprofiler/profilers/numerical_column_stats.py @@ -1810,8 +1810,6 @@ def _get_min( else: df_series = pl.from_pandas(df_series) min_value = df_series.min() - if self.min is not None: - min_value = type(self.min)(min_value) self.min = np.float64( min_value if not self.min else min(self.min, min_value) ) @@ -1890,15 +1888,13 @@ def _get_variance( batch_count = subset_properties["match_count"] batch_mean = 0.0 if not batch_count else float(sum_value) / batch_count subset_properties["mean"] = batch_mean - self._biased_variance = np.float64( - self._merge_biased_variance( - self.match_count, - self._biased_variance, - prev_dependent_properties["mean"], - batch_count, - batch_biased_variance, - batch_mean, - ) + self._biased_variance = self._merge_biased_variance( + self.match_count, + self._biased_variance, + prev_dependent_properties["mean"], + batch_count, + batch_biased_variance, + batch_mean, ) @BaseColumnProfiler._timeit(name="skewness")