- Subject: Re: [slang-users] Ranges with type qualifier in csv_readcol?
 
- From: "John E. Davis" <jed@xxxxxxxxxxx>
 
- Date: Sun, 31 Jan 2021 21:30:08 -0500
 
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]