(count-missing col)
Returns the number of missing values in column col
.
Returns the number of missing values in column `col`.
(drop-missing col)
Remove missing values from column col
.
Remove missing values from column `col`.
(replace-missing col)
(replace-missing col strategy)
(replace-missing col strategy value)
Replace missing values in column col
with give strategy
.
Strategies may be:
:down
- Take the previous value, or use provided value.:up
- Take the next value, or use provided value.:downup
- Take the previous value, otherwise take the next value.:updown
- Take the next value, otherwise take the previous value.:nearest
- Use the nearest of next or previous values. (Strategy :mid
is an alias for :nearest
).:midpoint
- Use the midpoint of averaged values between previous and next (non-missing) values.:abb
- Impute missing value with approximate Bayesian bootstrap.
See r's ABB.:lerp
- Linearly interpolate values between previous and next nonmissing rows.:value
- Provide a value explicitly. Value may be a function in which
case it will be called on the column with missing values elided
and the return will be used to as the filler.Replace missing values in column `col` with give `strategy`. Strategies may be: - `:down` - Take the previous value, or use provided value. - `:up` - Take the next value, or use provided value. - `:downup` - Take the previous value, otherwise take the next value. - `:updown` - Take the next value, otherwise take the previous value. - `:nearest` - Use the nearest of next or previous values. (Strategy `:mid` is an alias for `:nearest`). - `:midpoint` - Use the midpoint of averaged values between previous and next (non-missing) values. - `:abb` - Impute missing value with approximate Bayesian bootstrap. See [r's ABB](https://search.r-project.org/CRAN/refmans/LaplacesDemon/html/ABB.html). - `:lerp` - Linearly interpolate values between previous and next nonmissing rows. - `:value` - Provide a value explicitly. Value may be a function in which case it will be called on the column with missing values elided and the return will be used to as the filler.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close