[scilab-Users] read_csv
Adrien Vogt-Schilb
vogt at centre-cired.fr
Fri Apr 29 13:37:44 CEST 2011
I am sorry, i missunderstood your mail
your problem comes from your file lines ending with Mac style end of
lines (CR only) (see http://en.wikipedia.org/wiki/Newline#Representations)
i tested under windows, and read_csv seems to need windows style end of
lines (CR+LF). Are you running a Windows machine?
you should be able to convert quickly Mac styles ends of line (EOL) to
windows EOL. Myself, i use notepad++, Edit menu, End of lines, which
will be far too long if you have to do this frequently.
using csv_read instead of read_csv (see
http://atoms.scilab.org/toolboxes/csv_readwrite/) might solve your
problem. Allan?
lastly, unhability of read_csv to parse files with exotic EOL characters
can be considered as a bug (but might be considered as a "feature"), you
might ocnsider to report a bug.
best regards
Le 29/04/2011 13:24, Adrien Vogt-Schilb a écrit :
> hi
>
> you can try
>
> read_csv("myfile.csv"," ") //the second argument is a space between quotes
>
> read_cvs has a second optional argument, as stated in documentation,
> try: help read_csv
>
> best regards
>
> Le 29/04/2011 11:39, R Sippe a écrit :
>> Dear Sir/Madam,
>> I am new to Scilab and I want to use Scilab to analyze data contained
>> in csv files.
>> When I use read_csv(myfile.csv) it only returns the first row of the
>> data.
>> Opening the file in notepad shows that each row of data is separated
>> by a space instead of a return.
>> However these csv files are outputs of a program and I don’t want to
>> change the format manually for each csv file.
>> What is the best way to deal with this problem?
>> Greets,
>> Robin
>
>
> --
>
> *Adrien Vogt-Schilb*
>
> Research Fellow
>
> vogt at centre-cired.fr <mailto:vogt at centre-cired.fr>
>
> Tel: (+33) 1 43 94 73 96
>
> Fax: (+33) 1 43 94 73 70
>
> CIRED
>
>
>
> 45 bis, Av de la Belle Gabrielle
>
> F-94736 Nogent-sur-Marne
>
> http://www.centre-cired.fr/
>
--
*Adrien Vogt-Schilb*
Research Fellow
vogt at centre-cired.fr <mailto:vogt at centre-cired.fr>
Tel: (+33) 1 43 94 73 96
Fax: (+33) 1 43 94 73 70
CIRED
45 bis, Av de la Belle Gabrielle
F-94736 Nogent-sur-Marne
http://www.centre-cired.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110429/cffdbc2e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 4092 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20110429/cffdbc2e/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logocired.png
Type: image/png
Size: 4092 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20110429/cffdbc2e/attachment-0001.png>
More information about the users
mailing list