ExpectColumnDistinctValuesToEqualSet
Expect the set of distinct column values to equal a given set.
ExpectColumnDistinctValuesToEqualSet is a Column Aggregate Expectation.
Column Aggregate Expectations are one of the most common types of Expectation.
They are evaluated for a single column, and produce an aggregate Metric, such as a mean, standard deviation, number of unique values, column type, etc.
If that Metric meets the conditions you set, the Expectation considers that data valid.
Data sources | Maintained by |
---|---|
![]() Preview |
Args
- column (str): The column name.
- value_set (set-like): A set of objects used for comparison.
Examples
Sample data | ||
---|---|---|
Number | test | test2 |
test | test2 | |
0 | 1 | 1 |
1 | 2 | 1 |
2 | 4 | 1 |
Python
ExpectColumnDistinctValuesToEqualSet(
column="test",
value_set=[1, 2, 4]
)
Returns
{
"exception_info": {
"raised_exception": false,
"exception_traceback": null,
"exception_message": null
},
"result": {
"observed_value": [
1,
2,
4
],
"details": {
"value_counts": [
{
"value": 1,
"count": 1
},
{
"value": 2,
"count": 1
},
{
"value": 4,
"count": 1
}
]
}
},
"meta": {},
"success": true
}
Other Parameters
result_format (str or None): Which output mode to use: BOOLEAN_ONLY, BASIC, COMPLETE, or SUMMARY. For more detail, seeresult_format.
catch_exceptions (boolean or None): If True, then catch exceptions and include them as part of the result object. For more detail, seecatch_exceptions.
meta (dict or None): A JSON-serializable dictionary (nesting allowed) that will be included in the output without modification. For more detail, seemeta.
Data quality issues
- Uniqueness