On Mon, Dec 05, 2011 at 10:19:53AM -0500, Raymond N. Greenwell wrote:
>    This is getting warmer, but something must be different about my csv file.
>    It appears to me to contain the following:
> 
>             0          0          0          0          0 
>             1          0          0          1          0 
>             1          1          0          1          1 
>             1          0          0          0          0 
>             1          0          0          1          0 
> 
>    Here's what Sage does:
>    sage: cat "medalcomparison4.csv"
>    1,0,0,1,0sage: f = open("medalcomparison4.csv",'r')
>    sage: entries = map(lambda x:x.strip('\n').split(','), f.readlines())
>    sage: entries
>    [['0', '0', '0', '0', '0\r1', '0', '0', '1', '0\r1', '1', '0', '1',
>    '1\r1', '0', '0', '0', '0\r1', '0', '0', '1', '0']]

This sounds like a problem of encoding of newlines in the csv file
(they seem to be encoded as \r instead of \r\n or just \n; also, there
appear to be no newline at the end of the file). Which editor did you
use to create it? What's your platform?

Cheers,
                                Nicolas
--
Nicolas M. Thiéry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to