Load multiple csv files together and at once

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Load multiple csv files together and at once

zs1992
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Load multiple csv files together and at once

Ian McCallion
On Fri, 22 Nov 2019 at 10:06, zs1992 <[hidden email]> wrote:

>
> Hi everyone,
> I'm trying to load multiple csv files(over 200) at once, so I could write
> the whole data to Netcdf files.
> Since the csv files are mixed with numbers, date strings and column names, I
> can't use csvread or dlmread, otherwise I get weirdly-arranged data. I also
> tried dataframe, but it takes 28 seconds to read a csv file, which is way
> too time-consuming.
> Currently, what works for me is csv2cell, which converts a csv into a cell
> array. However, the csv files I have have different numbers of columns(also
> different column names). Therefore I can't concatenate them into one big
> cell array.
> Is there any good solutions to that?

Can you give us an example of your inputs and what you want to produce
as a intermediate stage, just before writing to NetCdf?

Cheers... Ian