bugGNU Octave - Bugs: bug #54029, "Name" is read as Na by...

 
 

bug #54029: "Name" is read as Na by dlmread (and by xlsread) in csv file

Submitted by:  Avinoam Kalma <avinoam>
Submitted on:  Thu 31 May 2018 10:25:08 PM UTC  
 
Category:  Octave Function Severity:  2 - Minor
Priority:  3 - Low Item Group:  Inaccurate Result
Status:  Confirmed Assigned to:  None
Originator Name:  Avinoam Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 14 Jun 2018 01:21:51 PM UTC, comment #4:

Thanks for testing. Matlab is very, very particular about only reading numeric files with dlmread. That seems a bit too restrictive. In Octave, skipping headder rows of text is straightforward and this is a common occurrence as many data files have a few lines of introductory text.

So I conclude that it would be nice if Octave were to recognize that "Name" is not Na and substitute the specified EMPTYVAL, but it is also a low priority. Matlab doesn't even allow for reading a file like nan.csv, and Octave can be made to read it by the trivial workaround of skipping the first text row.

Rik <rik5>
Project Administrator
Thu 14 Jun 2018 11:41:03 AM UTC, comment #3:

Matlab (2016b):

Octave 4.4.0:

Anonymous
Tue 12 Jun 2018 05:49:41 PM UTC, comment #2:

Marking as confirmed, but lowering the priority since there are easy workarounds. dlmread is only to be used for numeric data. The first line of 'aa.csv' is text and should be skipped entirely by specifying a range to dlmread which excludes the first line.

How does Matlab handle this example file ('nan.csv')?

followed by

How does Matlab handle this second example file ('nane.csv')?

followed by

Rik <rik5>
Project Administrator
Fri 01 Jun 2018 12:44:57 PM UTC, comment #1:

Hey, didn't know that xlsread can read .csv files....

(If you do that with the COM interface I suppose it's an upstream bug in Excel, similar to UNO interface with LibreOffice).

Philip Nienhuis <philipnienhuis>
Project Member
Thu 31 May 2018 10:25:08 PM UTC, original submission:

Example: the file 'aa.csv'

and:

Avinoam Kalma <avinoam>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by avinoam (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-12 rik5 Severity3 - Normal => 2 - Minor
        Priority5 - Normal => 3 - Low
        Item GroupUnexpected Error => Inaccurate Result
        StatusNone => Confirmed
        Operating SystemMicrosoft Windows => Any

    Back to the top


    Powered by Savane 3.3