bugGNU Octave - Bugs: bug #56263, [octave forge] (dataframe)...

 
 

bug #56263: [octave forge] (dataframe) dataframe ignores second line when reading csv file with all strings

Submitter:  Bo <bpeng2000>
Submitted:  Fri 03 May 2019 05:26:22 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  Bo Open/Closed:  * Open
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 27 Feb 2021 04:05:57 PM UTC, comment #6: 

I came looking for this thread to point out that this bug is still affecting users: https://stackoverflow.com/q/66389166/4183191

If this bug has been fixed in the repo, perhaps a bugfix release is in order?

Best,
T.

Tasos Papastylianou <tpapastylianou>
Wed 24 Jul 2019 04:54:03 PM UTC, comment #5: 

And a response from John D:

If I get a chance, I'll take a look at setting up a release based on the current code as a 1.3.0 or something

John W. Eaton <jwe>
Group administrator
Wed 24 Jul 2019 04:53:35 PM UTC, comment #4: 

Posted to the bug tracker mailing list by Pascal:

Dear all,

I started using extensively Python and Pandas around one year ago.  Have a look f.i. at
https://pandas.pydata.org/pandas-docs/stable/user_guide/style.html

MultiIndex. Slices. Ability to interact with Excell and LaTeX. To
solve all annoyances with CSV and encoding. Not to mention seaborn

So yes, I fixed dataframe; but quite frankly I stopped using it.
Pandas is lightyear ahead of dataframe in so many aspects.

If someone wish to make a release , I will welcome him / her as the new maintainer.

Regards

John W. Eaton <jwe>
Group administrator
Fri 14 Jun 2019 02:37:45 PM UTC, comment #3: 

I tried dataframe fron the repo, and it appears to work ok

If I checkout the dataframe-1.2.0 tag, it does the same as the inital comment, so it appears to have been fixed, just not in a release.




John Donoghue <lostbard>
Group Member
Wed 08 May 2019 08:45:08 PM UTC, comment #2: 

Hello,
the purpose of a second line with all chars is to indicate columns type. This line was silently removed.

I changed the behaviour: the second line is removed if
1) all fields are char
and
2) all fields are valid argument for the "cast" function

I'll release shortly a new version

Regards

Pascal

Pascal Dupuis <cdemills>
Group Member
Sat 04 May 2019 04:57:41 PM UTC, comment #1: 

Confirmed with dev Octave (6.0.0) & dataframe-1.2.0.

I tried to have a look to see if it were something simple but dataframe.m is quite a complicated function (and I actually lack time).

cc'ing package maintainer.

Philip Nienhuis <philipnienhuis>
Group Member
Fri 03 May 2019 05:26:22 PM UTC, original submission:  

With the attached csv files.

For dataframe with all characters


'name','mask','weapon'
'Leonardo','blue','ninjatos'
'Donatello','purple','bo'
'Michelangelo','orange','nunchaku'
'Raphael','red','sai'



pkg load dataframe
dataframe('dataframe.csv')

ans = dataframe with 3 rows and 3 columns
Src: dataframe.csv
_1         name   mask   weapon
Nr         char   char     char
 1    Donatello purple       bo
 2 Michelangelo orange nunchaku
 3      Raphael    red      sai


The second line is ignored. For a csv file with similar content but a numeric column,


'name','num','weapon'
'Leonardo',12,'ninjatos'
'Donatello',34,'bo'
'Michelangelo',56,'nunchaku'
'Raphael',78,'sai'


loading it yields 4 rows correctly

dataframe('dataframe_with_number.csv')
ans = dataframe with 4 rows and 3 columns
Src: dataframe_with_number.csv
_1         name    num   weapon
Nr         char double     char
 1     Leonardo     12 ninjatos
 2    Donatello     34       bo
 3 Michelangelo     56 nunchaku
 4      Raphael     78      sai


Bo <bpeng2000>

 

(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 tpapastylianou (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by cdemills (Posted a comment)
  • -email is unavailable- added by philipnienhuis
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by bpeng2000 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-04 philipnienhuis StatusNone Confirmed
        Carbon-Copy- Added -email is unavailable-
    2019-05-03 siko1056 Summarydataframe ignores second line when reading csv file with all strings [octave forge] (dataframe) dataframe ignores second line when reading csv file with all strings

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code