[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Reading/Manipulating a csv file with columns that have different data ty
From: |
frobeniustaco |
Subject: |
Reading/Manipulating a csv file with columns that have different data types |
Date: |
Tue, 21 Apr 2015 08:13:51 -0700 (PDT) |
Hi folks!
----------
First off, here is a small sample of the data I'm working with:
1/7/2015,0,Day,39,8346,32,10,5,0
1/8/2015,0,Day,39,4204,32,7,3,0
1/9/2015,0,Day,39,6848,29,6,6,0
----------
Here's what I want to do with it, once I get it read into Octave:
Columns 1, 3, and 4: I'll want to sort by month, shift (there will b 3
different strings as values) and machine id (also 3 different values).
Columns 5-8: I'll want to do some calculations with these:
----------
I have been searching far and wide for a method of getting my data into
octave in such a way that I can manipulate it as described above. I have
been able to at least read it a couple different ways (csvread, csv2cell,
etc) but if I try to do any arithmetic on columns 5-8 I get errors.
Anyone have an idea how I can get the data setup so I can reach those
objectives? The most frustrating part of all this I have a pretty
confident vision of how the rest of my script will look but I can't for the
life of me figure out the upload (which seems like it should just be a few
lines, at best).
Thanks!
--
View this message in context:
http://octave.1599824.n4.nabble.com/Reading-Manipulating-a-csv-file-with-columns-that-have-different-data-types-tp4669992.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Reading/Manipulating a csv file with columns that have different data types,
frobeniustaco <=