Description Usage Arguments Details Value Examples
Performs a test that a specific column has an expected number of unique values.
1 | test_column_n_unique_values(df, col, n_expected)
|
df |
A dataframe |
col |
The unquoted column name of the column you want to test |
n_expected |
The expected number of unique values |
This function is good to utilize after performing joining operations to validate that no duplicates or missing values have been created. Note that this function does not count how many times each unique value appears - just the overall number of distinct items.
The dataframe passed to the function.
1 2 | # Basic usage
test_column_n_unique_values(mtcars, cyl, 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.