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
[BUGFIX] Remove counts when showing a sample #9638
[BUGFIX] Remove counts when showing a sample #9638
Conversation
✅ Deploy Preview for niobium-lead-7998 canceled.
|
…t-accurate-v1' into b/zel-559/dont-show-counts-if-not-accurate-v1
great_expectations/render/util.py
Outdated
table_rows.append(["null", count]) | ||
# Since accurate counts for the full dataset are not available, we show Sampled Unexpected Values only. | ||
table_rows.append([value]) |
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 is the main change, removing the count from the table.
if all_unexpected_in_samples: | ||
header_row = ["Unexpected Value", "Count"] | ||
else: | ||
header_row = ["Sampled Unexpected Values"] |
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.
We also remove "Count" from the header (otherwise an empty column would render).
def _get_value_to_render(value_: Any) -> Any: | ||
if value_ is not None and value_ != "": | ||
return value_ | ||
if value_ == "": | ||
return "EMPTY" | ||
return "null" |
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.
❤️
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.
I think this is a big improvement in clarity of messaging. Thank you for adding the helper methods, and for pushing through this update @anthonyburdi 🙇🏼
When showing a sample of data in data docs, the unexpected list now no longer shows a count. The count was the number of times the value showed up in the sample, not in the entire dataset. This was confusing to users, prompting this change.
A sample of data is shown for the unexpected values when the data is too large to display in total and a result format other than
COMPLETE
is selected.Image showing the count column that is removed by this PR when showing a sample:
invoke lint
(usesruff format
+ruff check
)For more information about contributing, see Contribute.
After you submit your PR, keep the page open and monitor the statuses of the various checks made by our continuous integration process at the bottom of the page. Please fix any issues that come up and reach out on Slack if you need help. Thanks for contributing!