Missing Values
Julia has several different ways of representing missing data. If a column of data may contain missing values, JuliaDB supports both missing value representations of Union{T, Missing} and DataValue{T}.
While Union{T, Missing} is the default representation, functions that generate missing values (join) have a missingtype = Missing keyword argument that can be set to DataValue.
- The
convertmissingfunction is used to switch the representation of missing values.
julia> using DataValuesjulia> convertmissing(table([1, NA]), Missing)Table with 2 rows, 1 columns: 1 ─────── 1 missingjulia> convertmissing(table([1, missing]), DataValue)Table with 2 rows, 1 columns: 1 ─── 1 #NA
- The
dropmissingfunction will remove rows that containMissingor missingDataValues.
julia> dropmissing(table([1, NA]))Table with 1 rows, 1 columns: 1 ─ 1julia> dropmissing(table([1, missing]))Table with 1 rows, 1 columns: 1 ─ 1