SASLib.jl icon indicating copy to clipboard operation
SASLib.jl copied to clipboard

Option to convert NaN to Missing

Open tk3369 opened this issue 7 years ago • 0 comments

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

tk3369 avatar Apr 25 '18 06:04 tk3369