https://issues.dlang.org/show_bug.cgi?id=17109

Jon Degenhardt <jrdemail2000-dl...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jrdemail2000-dl...@yahoo.co
                   |                            |m

--- Comment #6 from Jon Degenhardt <jrdemail2000-dl...@yahoo.com> ---
There is no standard behavior for empty fields in CSV. Pragmatically, it's an
application level decision, meaning that the application that generated the CSV
chose  what the meaning is, and the application reading it needs to respect
this. Different higher level packages make their own choices of course.

R, for example, treats empty empty fields as "NA", meaning "Not Applicable" or
"Missing". This is a numeric value similar to but distinct from NaN (R borrows
a bit from floats and integers to do this). See R's read.table documentation.
Pandas treats empty as missing, but uses NaN to represent it. See "Working with
missing data" in the Pandas documentation
(http://pandas.pydata.org/pandas-docs/stable/missing_data.html), and the
pandas.read_csv documentation.

The real key though is that most of these CSV readers provide options
controlling interpretation. Depending on use case, error, NaN or some other
behavior may be warranted. D's CSV reader would benefit from having similar
control.

--

Reply via email to