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 convertmissing function is used to switch the representation of missing values.
julia> using DataValues
julia> convertmissing(table([1, NA]), Missing)Table with 2 rows, 1 columns: 1 ─────── 1 missing
julia> convertmissing(table([1, missing]), DataValue)Table with 2 rows, 1 columns: 1 ─── 1 #NA
  • The dropmissing function will remove rows that contain Missing or missing DataValues.
julia> dropmissing(table([1, NA]))Table with 1 rows, 1 columns:
1
─
1
julia> dropmissing(table([1, missing]))Table with 1 rows, 1 columns: 1 ─ 1