-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataProfiler: hotfix for handling nan
values in diff
#647
DataProfiler: hotfix for handling nan
values in diff
#647
Conversation
@@ -1,11 +1,10 @@ | |||
"""Contains functions for checking for installations/dependencies.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file was updated from pre-commit
dataprofiler/tests/profilers/test_numeric_stats_mixin_profile.py
Outdated
Show resolved
Hide resolved
dataprofiler/tests/profilers/test_numeric_stats_mixin_profile.py
Outdated
Show resolved
Hide resolved
09a83cf
to
3e60a7f
Compare
@@ -140,7 +140,7 @@ def setUpClass(cls): | |||
"id": [ | |||
{}, | |||
{ | |||
"bin_counts": "unchanged", | |||
"bin_counts": [[1], [1, 1, 2], []], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated outputs based on the changes made to find_diff_of_lists_and_sets(stat1, stat2)
@@ -61,7 +61,7 @@ def test_find_diff(self): | |||
|
|||
# Ensure lists and sets are handled appropriately | |||
self.assertEqual( | |||
"unchanged", utils.find_diff_of_lists_and_sets([3, 2], [2, 3, 2]) | |||
[[], [3, 2], [2]], utils.find_diff_of_lists_and_sets([3, 2], [2, 3, 2]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated outputs based on the changes made to find_diff_of_lists_and_sets(stat1, stat2)
unique2 = [element for element in stat2 if element not in stat1] | ||
diff = [unique1, shared, unique2] | ||
elif set(stat1) != set(stat2) or len(stat1) != len(stat2): | ||
temp_stat1 = list(copy.deepcopy(stat1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added deepcopy but then assigned to list because testing output expects lists not sets
find_diff_of_lists_and_sets()
handlesnan
values now