Skip to content

New Check: Distinct Ratio #18

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

Closed
flitzpiepe93 opened this issue May 7, 2025 · 1 comment
Closed

New Check: Distinct Ratio #18

flitzpiepe93 opened this issue May 7, 2025 · 1 comment
Labels
enhancement New feature or request feature request

Comments

@flitzpiepe93
Copy link
Contributor

New Check: Distinct Ratio

Description

Create a check to validate that a minimum percentage of values in a column are distinct.

Example Usage

DistinctRatioCheckConfig(
    check_id="passenger-count-uniqueness",
    column="passenger_count",
    min_ratio=0.8
)

Expected Behavior

  • Calculates the ratio of distinct (non-null) values relative to the total number of rows
  • Fails the check if the actual distinct ratio is below the given threshold
  • Should optionally return failed rows or summary only

Benefits

  • Detects columns with low cardinality that might indicate issues (e.g. constant values)
  • Useful for identifying uninformative or suspiciously uniform features
@flitzpiepe93
Copy link
Contributor Author

Issue solved with the following MR: #33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature request
Projects
None yet
Development

No branches or pull requests

1 participant