Description Usage Arguments Value Examples
Drop constant columns in a dataframe. Optional parameter to return 2nd dataframe of counts.
1 2 | ezr.drop_constant(dataset, return_n_distinct_tbl = FALSE,
exclude_cols = NULL, include_NAs = TRUE)
|
dataset |
Dataframe |
return_n_distinct_tbl |
return a 2nd dataframe just showing counts of n_distincts in each column |
exclude_cols |
Exclude this column...use if want to keep a constant |
remove_NAs |
if TRUE, NAs are not counted. If FALSE, NAs are counted as a unique value |
Returns the corrected dataframe or corrected_dataframe + a n_distinct table
1 2 | mtcars$constant = 'constant_value'
ezr.drop_constant(mtcars, return_n_distinct_tbl = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.