cjprybol / uCSV.jl

A Julia package for reading and writing delimited-text; µ in size, ∞ in flexibility
Other
8 stars 2 forks source link

Is it possible to skip also initial n columns ? #3

Open sylvaticus opened 6 years ago

sylvaticus commented 6 years ago

In matlab you can : A = dlmread(myfile,'\t',2,3); to skip the first 2 columns and 3 rows.

Can you do the same with uCSV ? I saw skiprows and header but not something similar for columns. (I don't know the name of the columns not their number)

cjprybol commented 6 years ago

It is not currently possible to skip the first n columns by passing an argument to uCSV.read. At one point I had an argument for skipping the first n columns, but it didn't offer any meaningful performance improvements so I removed it. It could be re-implemented for convenience though.

One way to achieve the same effect is to discard the first n columns from the output, or if you have a very large dataset, it might be more efficient to remove the first n columns before parsing it with uCSV.read.