Measures the facts validate_config checks a config against: dimensions, column types, distinct and missing counts per column, level counts for low-cardinality categorical columns, and the number of complete cases.
Arguments
- x
tabular data: The dataset.
- n_duplicates
Logical: If TRUE, count rows that repeat an earlier row. The one whole-table operation here; FALSE leaves the field NULL.
- fingerprint
Logical: If TRUE, record a data_fingerprint of
x. Hashes the whole dataset, so it is off by default.
Details
One pass per column and no copy of the data, so profiling is cheap enough to do per validation.
Examples
p <- data_profile(iris)
p@columns#> name dtype n_distinct n_missing
#> 1 Sepal.Length number 35 0
#> 2 Sepal.Width number 23 0
#> 3 Petal.Length number 43 0
#> 4 Petal.Width number 22 0
#> 5 Species categorical 3 0p@level_counts#> column level n
#> 1 Species setosa 50
#> 2 Species versicolor 50
#> 3 Species virginica 50