Skip to contents

Build a single-column profile record.

Usage

morie_dataset_column_profile(
  series,
  name,
  ordinal_threshold = 10L,
  binary_threshold = 2L
)

Arguments

series

A vector.

name

Column name.

ordinal_threshold

Integer; passed to morie_dataset_infer_level().

binary_threshold

Integer; max unique values to count as binary (default 2).

Value

Named list with fields name, dtype, level, n_unique, missing_pct, is_binary, is_constant, suggested_role, summary_stats.

Examples

cp <- morie_dataset_column_profile(c(1, 2, 3, NA), "year_obs")
cp$dtype
#> [1] "numeric"
cp$missing_pct
#> [1] 25