slang-users mailing list

[2021 Date Index] [2021 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] Ranges with type qualifier in csv_readcol?


Morten Bo Johansen <mbj@xxxxxxxxxxx> wrote:
> Can I use a range specification of columns with the type
> qualifier in csv_readcol?
>
> There are 202 columns and I would like the first one to be
> type='s' and the subsequent 201 columns to be type='d'.

You can achieve this in two ways:

    1.  type = Int_Type[202]; type[*] = 'd'; type[0] = 's';
        csv = csv_readcol (file; has_header, type=type);

    2.  csv = csv_readcol (file; has_header, type='d', type1='s');

As you can see, the second approach is simpler for your case.

--John
_______________________________________________
For list information, visit <http://jedsoft.org/slang/mailinglists.html>.


[2021 date index] [2021 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]