validatex.expectations package
Submodules
validatex.expectations.aggregate_expectations module
Aggregate / cross-column expectations.
Expectations that involve relationships between multiple columns or aggregated computations.
- class validatex.expectations.aggregate_expectations.ExpectColumnPairValuesAToBeGreaterThanB(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect values in column_a to be greater than values in column_b.
- expectation_type: str = 'expect_column_pair_values_a_to_be_greater_than_b'
- class validatex.expectations.aggregate_expectations.ExpectColumnPairValuesToBeEqual(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect values in two columns to be equal row-wise.
- expectation_type: str = 'expect_column_pair_values_to_be_equal'
- class validatex.expectations.aggregate_expectations.ExpectCompoundColumnsToBeUnique(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect the combination of values across multiple columns to be unique.
- expectation_type: str = 'expect_compound_columns_to_be_unique'
- class validatex.expectations.aggregate_expectations.ExpectMulticolumnSumToEqual(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect the sum across multiple columns (row-wise) to equal a target.
- expectation_type: str = 'expect_multicolumn_sum_to_equal'
validatex.expectations.column_expectations module
Column-level expectations.
Each class is a self-contained expectation that validates properties of individual columns in a DataFrame.
- class validatex.expectations.column_expectations.ExpectColumnDistinctValuesToBeInSet(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect all distinct values in a column to be in the given set.
- expectation_type: str = 'expect_column_distinct_values_to_be_in_set'
- class validatex.expectations.column_expectations.ExpectColumnMaxToBeBetween(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect the maximum value of a column to be between min_value and max_value.
- expectation_type: str = 'expect_column_max_to_be_between'
- class validatex.expectations.column_expectations.ExpectColumnMeanToBeBetween(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect the mean value of a numeric column to fall within bounds.
- expectation_type: str = 'expect_column_mean_to_be_between'
- class validatex.expectations.column_expectations.ExpectColumnMinToBeBetween(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect the minimum value of a column to be between min_value and max_value.
- expectation_type: str = 'expect_column_min_to_be_between'
- class validatex.expectations.column_expectations.ExpectColumnProportionOfUniqueValuesToBeBetween(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect the proportion of unique values in a column to fall within bounds.
- expectation_type: str = 'expect_column_proportion_of_unique_values_to_be_between'
- class validatex.expectations.column_expectations.ExpectColumnStdevToBeBetween(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect the standard deviation of a column to fall within bounds.
- expectation_type: str = 'expect_column_stdev_to_be_between'
- class validatex.expectations.column_expectations.ExpectColumnToExist(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect a column to exist in the DataFrame.
- expectation_type: str = 'expect_column_to_exist'
- class validatex.expectations.column_expectations.ExpectColumnToNotBeNull(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect a column to contain no null values.
- expectation_type: str = 'expect_column_to_not_be_null'
- class validatex.expectations.column_expectations.ExpectColumnValueLengthsToBeBetween(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect string lengths in a column to be within [min_value, max_value].
- expectation_type: str = 'expect_column_value_lengths_to_be_between'
- class validatex.expectations.column_expectations.ExpectColumnValuesToBeBetween(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect column values to fall within [min_value, max_value].
- expectation_type: str = 'expect_column_values_to_be_between'
- class validatex.expectations.column_expectations.ExpectColumnValuesToBeDateutilParseable(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect column values to be parseable as dates.
- expectation_type: str = 'expect_column_values_to_be_dateutil_parseable'
- class validatex.expectations.column_expectations.ExpectColumnValuesToBeInSet(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect every value in a column to be a member of a given set.
- expectation_type: str = 'expect_column_values_to_be_in_set'
- class validatex.expectations.column_expectations.ExpectColumnValuesToBeOfType(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect a column’s dtype to match the expected type string.
- expectation_type: str = 'expect_column_values_to_be_of_type'
- class validatex.expectations.column_expectations.ExpectColumnValuesToBeUnique(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect all values in a column to be unique (no duplicates).
- expectation_type: str = 'expect_column_values_to_be_unique'
- class validatex.expectations.column_expectations.ExpectColumnValuesToMatchRegex(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect column values to match a given regular expression.
- expectation_type: str = 'expect_column_values_to_match_regex'
- class validatex.expectations.column_expectations.ExpectColumnValuesToNotBeInSet(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect no value in a column to be a member of the given set.
- expectation_type: str = 'expect_column_values_to_not_be_in_set'
validatex.expectations.table_expectations module
Table-level expectations.
These expectations operate on the DataFrame as a whole rather than on individual columns.
- class validatex.expectations.table_expectations.ExpectTableColumnCountToEqual(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect the number of columns to match an exact value.
- expectation_type: str = 'expect_table_column_count_to_equal'
- class validatex.expectations.table_expectations.ExpectTableColumnsToMatchOrderedList(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect the columns of a DataFrame to match an exact ordered list.
- expectation_type: str = 'expect_table_columns_to_match_ordered_list'
- class validatex.expectations.table_expectations.ExpectTableColumnsToMatchSet(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect the set of column names to match (order-independent).
- expectation_type: str = 'expect_table_columns_to_match_set'
- class validatex.expectations.table_expectations.ExpectTableRowCountToBeBetween(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect the row count to be within [min_value, max_value].
- expectation_type: str = 'expect_table_row_count_to_be_between'
- class validatex.expectations.table_expectations.ExpectTableRowCountToEqual(column: str | None = None, kwargs: Dict[str, Any]=<factory>, meta: Dict[str, Any]=<factory>)[source]
Bases:
ExpectationExpect the total number of rows to equal an exact count.
- expectation_type: str = 'expect_table_row_count_to_equal'
Module contents
Built-in expectations for ValidateX.