SASLib.jl
SASLib.jl copied to clipboard
Option to convert NaN to Missing
SAS7BDAT stores all numbers as floating point values. When a value is missing, it stores the number as NaN. Technically, NaN and missing data are different things but in this scenario is more likely the number is missing than a true NaN.
This enhancement request is to treat NaN as missing value when reading the file. The column type effectively changes from vector of Float64 to vector of Union{Missing, Float64}. Such behavior may be requested by the user using a new keyword argument nan_as_missing. Further, this option may be used in conjunction with the column_types argument given that some types e.g. Int do not support NaN.
Ref comments from #32 and #42