Skip to content

Commit

Permalink
Revert "Bug fix for float precision calculation using categorical dat…
Browse files Browse the repository at this point in the history
…a with t…" (#1133)

This reverts commit d3159bd.
  • Loading branch information
taylorfturner authored Apr 15, 2024
1 parent d3159bd commit 7434cd0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
5 changes: 1 addition & 4 deletions dataprofiler/profilers/float_column_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,7 @@ def _get_float_precision(

# length of sampled cells after all punctuation removed
len_per_float = (
df_series_clean.sample(sample_size)
.astype(object)
.replace(to_replace=r, value="")
.map(len)
df_series_clean.sample(sample_size).replace(to_replace=r, value="").map(len)
).astype(float)

# Determine statistics precision
Expand Down
7 changes: 0 additions & 7 deletions dataprofiler/tests/profilers/test_float_column_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,6 @@ def test_profiled_precision(self):
msg=f"Errored for: {sample[0]}",
)

# Validate categorical series with trailing zeros supported
categorical_series = pd.Series(
[202209, 202210, 202211], dtype="category"
).apply(str)
float_profiler = FloatColumn("Name")
float_profiler.update(categorical_series)

def test_profiled_min(self):
# test with multiple values
data = np.linspace(-5, 5, 11)
Expand Down

0 comments on commit 7434cd0

Please sign in to comment.