[Tutor] spss.BasePivotTable
Albert-Jan Roskam
fomcl at yahoo.com
Tue Aug 27 15:31:58 CEST 2013
Ooops, sorry.... wrong mailing list! ;-)
Regards,
Albert-Jan
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a
fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message -----
> From: Albert-Jan Roskam <fomcl at yahoo.com>
> To: Python Mailing List <tutor at python.org>
> Cc:
> Sent: Tuesday, August 27, 2013 3:14 PM
> Subject: [Tutor] spss.BasePivotTable
>
> Hello,
>
> I am trying to create a BasePivot table with three columns: one for the labels,
> one for a a category "Before" and one for "After". The
> following attempt fails, but what am I doing wrong?
>
> begin program.
> import spss
> try:
> spss.StartSPSS()
> #spss.Submit("get file='demo.sav'.")
> spss.StartProcedure("proc")
> table = spss.BasePivotTable("table","mytable")
> table.Append(spss.Dimension.Place.row,"rowdim")
> table.Append(spss.Dimension.Place.column,"coldim1")
> table.Append(spss.Dimension.Place.column,"coldim2")
> value1 = spss.CellText.Number(23,spss.FormatSpec.Count)
> value2 = spss.CellText.Number(24,spss.FormatSpec.Count)
> table[(spss.CellText.String("M"),)] = (value1, value2)
> spss.EndProcedure()
> spss.StopSPSS()
> except spss.SpssError:
> print "Error."
> print spss.GetLastErrorMessage()
> end program.
>
> Thank you in advance!
>
> Regards,
> Albert-Jan
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> All right, but apart from the sanitation, the medicine, education, wine, public
> order, irrigation, roads, a
> fresh water system, and public health, what have the Romans ever done for us?
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
More information about the Tutor
mailing list