LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dealing with Large csv data

Hello all,

I have large csv File. I want to convert to array (by Spreadsheet String to Array.vi).

Could you please tell me which one is more faster & Better. Sometimes if my file size is very big then Spreadsheet String to Array is not working (as per approach 2 & 3) because of Out of memory.

 

CSV Reading.png

Munna
0 Kudos
Message 1 of 10
(3,444 Views)

Hi Munna,

 

you already gave answers to your questions:

- you measure execution time to answer "which is faster"

- method 2&3 will fail due to "out of memory" errors, so method 1 is better…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(3,408 Views)

Hi GerdW,

 

Thanks for your reply.

 

I want to know if there is any other method better than this.

Munna
0 Kudos
Message 3 of 10
(3,370 Views)

It really depends on what you are doing with the data.  Sometimes it is just best to read part of the file, process it, and then overwrite with the next section of the data.  But you definately need to read the file in parts.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 10
(3,356 Views)

What are you doing with the data that requires you to read such a large data set?

 

When the second and third options don't error out, are they faster?

0 Kudos
Message 5 of 10
(3,351 Views)

I have files looks like left side (old Type). I need to replace it by right side Image (New Type).

Here, I need to check,

where values getting started --- > before this value I need to replace empty cells by NaN.

Where values got ended -- > after that value I need to replace empty cells by NaN.

In between I need to take previous values.

 

NaN Image.png

Munna
0 Kudos
Message 6 of 10
(3,328 Views)

Are you just saving this data to another file or are you doing something else with it?

 

But definately read the file in parts and use shift registers to keep your "previous" values.  A simple check for a blank and Replace Array Subset is all you really need.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 10
(3,300 Views)

This all has been discussed before

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 10
(3,293 Views)

Hi GerdW,

 

Yes, we have already discussed about this before. Here, I’m not discussing again.

Just I want to know best way to deal with Large data.

Munna
0 Kudos
Message 9 of 10
(3,265 Views)

Hi Crossrulz,

 

As per my understanding reading file with parts is not possible in this case (with one time file reading).

Because, I have to get where signal got stopped & where started.

 

for more details:

http://forums.ni.com/t5/LabVIEW/Reading-Large-Text-file/td-p/3022697

Munna
0 Kudos
Message 10 of 10
(3,261 Views)