Quantcast

load for a csv file "unable to determine file format of 'fmt2_Movements.csv'

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

load for a csv file "unable to determine file format of 'fmt2_Movements.csv'

ssumcy
hi Team,

Started learning Octave only recently. Absolutely newbie.
Am trying to load a csv file which has contents like below and am getting error

>> load fmt2_PlanetaryMovements.csv
error: load: unable to determine file format of 'fmt2_PlanetaryMovements.csv'

Planetary Movements for March, 2017:

Entry of planets into signs

Surya enters Pisces 14 19:38:59
Mangala enters Aries 1 23:05:23
Budha enters Pisces 8 22:53:52
Budha enters Aries 29 2:47:42
Guru enters Virgo 9 18:07:36
Sukra enters Aquarius 26 13:56:51

Entry of planets in nakshatras

Surya enters Poorvabhadra 4 19:53:15
Surya enters Uttarabhadra 18 3:53:12
Surya enters Revati 31 14:31:28
Mangala enters Aswini 1 23:05:23
Mangala enters Bharani 20 18:02:14
Budha enters Poorvabhadra 3 6:39:57
Budha enters Uttarabhadra 10 21:28:27
Budha enters Revati 19 2:36:39
Budha enters Aswini 29 2:47:42
Sukra enters Poorvabhadra 21 2:27:04

Planetary aspects of Jyotish:

Sy [C] Bu 1 7:12:53
Ch [C] Ma 2 5:29:49
Sa [5] Ch 2 5:50:33
Ch [9] Sa 2 5:50:33
Ch [9] Sa 2 5:50:33
Sa [5] Ch 2 5:50:33
Ch [S] Gu 2 6:11:29
Ma [9] Sa 2 12:49:48
Sa [5] Ma 2 12:49:48
Sa [5] Ma 2 12:49:48
.....
Idea is to enter the positions into a cell and reshape the 3 sections as in this file. What is the best way to read such a file? Just want to read this file either as csv, excel or rtf. File does not get loaded. Textread is quite round about.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: load for a csv file "unable to determine file format of 'fmt2_Movements.csv'

NJank
On Fri, Mar 24, 2017 at 10:20 AM, ssumcy <[hidden email]> wrote:
hi Team,

Started learning Octave only recently. Absolutely newbie.
Am trying to load a csv file which has contents like below and am getting
error


well, csv means comma separated value, and you have no commas separating that data.

load without any options in not necessarily expecting to see formatted ascii data. it expects to see formatted data created with the save command.  you can specify a -ascii option, but even that will fail here. as you can see from 'help load', the -ascii option would expect to see "columns of numbers in text format without any header or other information.". 


you should probably check out some of the other text input functions, and see if you can adapt them to your data.

help textread
help dlmread
help csvread




_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: load for a csv file "unable to determine file format of 'fmt2_Movements.csv'

Przemek Klosowski-7
In reply to this post by ssumcy
On 03/24/2017 10:20 AM, ssumcy wrote:

error: load: unable to determine file format of
'fmt2_PlanetaryMovements.csv'

Planetary Movements for March, 2017:

Entry of planets into signs

Surya	enters	Pisces	14	19:38:59
Mangala	enters	Aries	1	23:05:23
Budha	enters	Pisces	8	22:53:52...
This does not look at all like a .csv file: CSV stands for 'comma separated values', i.e. the lines in the file should look like   "somestring", 1.2, 3.4
.....
Idea is to enter the positions into a cell and reshape the 3 sections as in
this file. What is the best way to read such a file? Just want to read this
file either as csv, excel or rtf. File does not get loaded. Textread is
quite round about. 
Yes, but since your file is fairly unstructured, you may have to use textread(). Can you change the generation of the file so that it actually is a .csv format?
load fmt2_PlanetaryMovements.csv
the load command is designed for Octave/Matlab own file format---actually, if you have control over the output of your data files, you could write them to mimic the Octave text format, perhaps; that would make it very easy to read it in.

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Loading...