10-08-2014 01:25 PM
@billko:
My understanding is that CSV files contain only numerical data, separated by commas, while an Excel file can have words, pictures, graphs etc....
If my file has a mixture of integers and decimals only, would a CSV file be okay to use?
Thanks!
10-08-2014 01:30 PM
@Munna, the actual file that I'll be working with has close to 300 columns out of which I need to choose about 8. The file that I attached with my post was just dummy data - the real data is confidential which is why I can't post it. Do you have any other ideas?
Thanks.
10-08-2014 01:34 PM - edited 10-08-2014 01:36 PM
Hi rhupd,
CSV files can contain anything of integer, floats, strings - even mixed wildly.
Main point is: they use a certain delimiter between "cells" (most often tabs or comma, but not limited to those two) and LF/CR denotes a new row of data…
To limit memory consumption when loading your 300+ columns CSV file you could also work with chunks of your data: read in a limited number of lines and convert them using SpreadsheetStringToArray.
10-08-2014 02:51 PM
@GerdW: That's a good suggestion. I think I do that....read the files in chunks but how would I specificy which columns to display? Could I use Munna's suggestion about choosing which column to show? I could read the file in chunks of 10 columns and then decide which ones I want to show. That seems kind of clunky though for a big file. What do you think?
10-08-2014 03:26 PM
10-08-2014 03:28 PM
Sorry, I read that too quickly. So if read an x number of lines, it still leaves me with the same problem of trying to specify which columns to use out of 300+.
10-08-2014 03:33 PM
10-08-2014 11:24 PM
As others told,
If you have problem with Data size to display all data at once then Read chunks and Build your array.
Check this snippet,
Here, I’m reading every 1000 lines from file and picking selected index (column) & Building the array.
10-09-2014 02:34 PM
@Dennis: I was working on Munna's previous suggestion before I saw his updated suggestion. I'm trying to understand how the blue array works. I can't figure out what the 0 on the left represents and why there are 4 elements but there's a number 2 in the second box. Are we choosing the second column? If so, why put the number 2 in the second box? Why not put it in the first or third or fourth? In the index array, where's the row index and the column index? I looked at help and it said to specify the row and colum index but I can't even figure out where they are. I'm getting extremely frustrated!!
There's nothing particular about choosing which column will be used; it depends on the engineers and what they want to see.
10-09-2014 08:55 PM
Hello,
If you’re getting frustrated then who will do you task?
Index array will works based on your input array. If your giving 1D type array then you can select only Row index. If it is 2D then you can select row or column or both (depends on your requirement).
Check this attached VI. I made 2 approaches. one is to read all data at once and other one is to read by chunks.
Based on your Data size, use which one you wants.
At first it will display all your signal list, from that you need to select signals to display.