pspp-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reading a csv file


From: Stefano Mazzuco
Subject: Re: reading a csv file
Date: Mon, 8 Jan 2007 11:41:33 +0100 (CET)

Thanks for that. Given I had many csv files to deal with, it would have
been painful to delete the first line from each of them.

So using the "simulated" SKIP command works fine.


------------------------------
Stefano Mazzuco

Dipartimento di Scienze Statistiche
Via Cesare Battisti, 241
35121 Padova, Italy
tel: +39 049 8274192
fax: +39 049 8274170
home page: http://homes.stat.unipd.it/mazzuco



On Fri, 5 Jan 2007, Ben Pfaff wrote:

> Stefano Mazzuco <address@hidden> writes:
>
> > Sorry for a probably stupid question but I'm quite new to pspp and cannot
> > find a proper answer in the manual.
> >
> > I'm trying to read a dataset in "comma-separated" format. A problem I have
> > in doing this is that variables names are already in the data file in the
> > first line, but I don't know how to tell it to pspp.
>
> If the format of the CSV file is sufficiently simple (i.e. no
> quoted fields) then you should be able to use DATA LIST LIST with
> ',' as delimiter character and specifying SKIP=1 to skip the
> first line.  If you're using PSPP 0.4.0, instead of the version
> from CVS, then the SKIP subcommand won't be available, and you
> can do something like the following to simulate it:
>         COMPUTE SEQ=$CASENUM.
>         EXECUTE.
>         SELECT IF SEQ <> 1.
> --
> Ben Pfaff
> email: address@hidden
> web: http://benpfaff.org
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]