Hello Forum,

I currently try to work with some CSV data. Say, I have a boxed vector with
names of CSV files like this:

filenames =: 'tf1.csv';'tf2.csv';'tf3.csv'

And I have a small verb to load the files specified in filenames:

loadcsv =: [: }. ';'&readdsv      NB. load 'tables/dsv'

It is guaranteed, that all CSV files in filenames have the same number of
columns, but they usually do have a different number of rows.

What I do want to do now is to stack all CSV files in filenames column
wise. Executing, e.g. ./ loadcsv"0 filenames gives me all data stacked onto
one another, but the array now contains some rows of empty boxes. This
makes sense, I think, since loadcsv"0 creates a shape of x y z, where x is
the number of CSV files processed and some fill items are included to make
the result fit.

I feel like there should be a way to avoid this undesirable effect in order
to stack all files one onto the other. Or is the more idiomatic way to
first stack the data and then to filter out the fill rows?

Thanks for your support and kind regards,

Thomas
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to