Skip to content
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

Merged
merged 13 commits into from Mar 22, 2024

Conversation

anthonyburdi
Copy link
Member

@anthonyburdi anthonyburdi commented Mar 19, 2024

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:
image

  • Description of PR changes above includes a link to an existing GitHub issue
  • PR title is prefixed with one of: [BUGFIX], [FEATURE], [DOCS], [MAINTENANCE], [CONTRIB]
  • Code is linted - run invoke lint (uses ruff format + ruff check)
  • Appropriate tests and docs have been updated

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!

Copy link

netlify bot commented Mar 19, 2024

Deploy Preview for niobium-lead-7998 canceled.

Name Link
🔨 Latest commit acfaa1b
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/65fcc0221e01380008d8f7f2

@anthonyburdi anthonyburdi marked this pull request as draft March 19, 2024 17:39
@anthonyburdi anthonyburdi marked this pull request as ready for review March 21, 2024 22:53
…t-accurate-v1' into b/zel-559/dont-show-counts-if-not-accurate-v1
Comment on lines 272 to 302
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])
Copy link
Member Author

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"]
Copy link
Member Author

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).

Comment on lines +244 to +249
def _get_value_to_render(value_: Any) -> Any:
if value_ is not None and value_ != "":
return value_
if value_ == "":
return "EMPTY"
return "null"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Copy link
Contributor

@Shinnnyshinshin Shinnnyshinshin left a 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 🙇🏼

@anthonyburdi anthonyburdi added this pull request to the merge queue Mar 22, 2024
Merged via the queue into develop with commit a17c71e Mar 22, 2024
68 checks passed
@anthonyburdi anthonyburdi deleted the b/zel-559/dont-show-counts-if-not-accurate-v1 branch March 22, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants