没有合适的资源?快使用搜索试试~ 我知道了~
首页SPSS中python应用详解 最新版.pdf
资源详情
资源评论
资源推荐

i
Python Integra tion Packa ge for IBM
SPSS Sta tistics

Note: Before using this information and the product it supports, read the general information
under Notices on p. 117.
This edition applies to IBM® SPSS ® Statistics 21 and to all subsequent releases and modifications
until otherwise indicated in new editions.
Adobe product screenshot(s) reprinted with permission from Adobe Systems Incorporated.
Microsoft p roduct screenshot(s) reprinted with permission from Microsoft Corporation.
Licensed Materials - Property of IBM
© C opyright IBM Corporation 1989, 2012.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP
Schedule Contract with IBM Corp.

Contents
1 Introduction to Python Programs 1
WorkingwithPythonProgramBlocks.............................................. 2
BasicSpecificationforaPythonProgramBlock .................................. 2
NestedProgramBlocks..................................................... 4
UnicodeMode............................................................ 6
PythonSyntaxRules........................................................... 7
WorkingwithMultipleVersionsofIBMSPSSStatistics ................................ 8
PythonandIBMSPSSStatisticsWorkingDirectories.................................. 9
RunningIBMSPSSStatisticsfromanExternalPythonProcess........................... 9
LocalizingOutputfromPythonPrograms............................................10
ModifyingthePythoncode ..................................................11
Extractingtranslatabletext ..................................................12
Translatingthepotfile......................................................13
Installing the mo files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2 Python Functions and Classes 15
spss.ActiveDatasetFunction.....................................................16
spss.AddProcedureFootnotesFunction.............................................17
spss.BasePivotTableClass......................................................17
CreatingPivotTableswiththeSimplePivotTableMethod............................18
GeneralApproachtoCreatingPivotTables ......................................20
spss.BasePivo
tTableMethods................................................25
spss.CellTextClass ........................................................38
CreatingaWarningsTable...................................................42
spss.BaseProcedureClass......................................................43
spss.CreateXPathDictionaryFunction..............................................46
spss.CursorClass.............................................................46
ReadMode..............................................................47
WriteMode..............................................................48
AppendMode............................................................51
spss.CursorMethods.......................................................52
spss.Dataset Cl
ass............................................................69
casesProperty ...........................................................7
3
nameProperty............................................................74
varlistProperty...........................................................74
dataFileAttrib
utesProperty ..................................................74
multiResponseSetProperty..................................................75
© Copyright IBM Corporation 1989, 2012.
iii

closeMethod ............................................................77
deepCopyMethod.........................................................77
CaseListClass............................................................77
VariableListClass .........................................................82
VariableClass............................................................84
spss.DataStepClass...........................................................90
spss.DeleteXPathHandleFunction ................................................90
spss.EndDataStepFunction .....................................................90
spss.EndProcedureFunction ....................................................91
spss.EvaluateXPathFunction....................................................91
spss.GetCaseCountFunction ....................................................92
spss.GetDataFileAttributeNamesFunction ..........................................92
spss.GetDataFileAttributesFunction...............................................92
spss.GetDatasetsFunction......................................................92
spss.GetDefaultPlugInVersionFunction ............................................93
spss.GetFileHandlesFunction....................................................93
spss.GetHandleListFunction.....................................................93
spss.GetImageFunction........................................................93
spss.GetLastErrorLevelandspss.GetLastErrorMessageFunctions........................94
spss.GetMultiResponseSetNamesFunction.........................................96
spss.GetMultiResponseSetFunction...............................................96
spss.GetOMSTagListFunction....................................................96
spss.GetSettingFunction .......................................................96
spss.GetSplitVariableNamesFunction..............................................97
spss.GetSPSSLocaleFunction ...................................................97
spss.GetSPSSLowHighFunction..................................................97
spss.GetVarAttributeNamesFunction..............................................97
spss.GetVarAttributesFunction...................................................98
spss.GetVariableCountFunction..................................................98
spss.GetVariableFormatFunction.................................................99
spss.GetVariableLabelFunction..................................................99
spss.GetVariableMeasurementLevelFunction....................................... 100
spss.GetVariableNameFunction................................................. 100
spss.GetVariableRoleFunction.................................................. 100
spss.GetVariableTypeFunction.................................................. 101
spss.GetVarMissingValuesFunction.............................................. 101
spss.GetWeightVarFunction.................................................... 102
spss.GetXmlUtf16Function..................................................... 102
spss.HasCursorFunction ...................................................... 102
iv

spss.IsActiveFunction........................................................ 103
spss.IsOutputOnFunction...................................................... 103
spss.ProcedureClass......................................................... 103
spss.PyInvokeSpss.IsUTF8modeFunction.......................................... 104
spss.PyInvokeSpss.IsXDrivenFunction............................................ 104
spss.SetActiveFunction....................................................... 105
spss.SetDefaultPlugInVersionFunction............................................ 105
spss.SetMacroValueFunction .................................................. 106
spss.SetOutputFunction....................................................... 106
spss.SetOutputLanguageFunction............................................... 106
spss.ShowInstalledPlugInVersionsFunction........................................ 107
spss.SplitChangeFunction..................................................... 107
spss.StartDataStepFunction.................................................... 109
spss.StartProcedureFunction................................................... 109
spss.StartSPSSFunction ...................................................... 112
spss.StopSPSSFunction....................................................... 112
spss.SubmitFunction......................................................... 113
spss.TextBlockClass ......................................................... 114
appendMethod.......................................................... 115
Appendices
A Variable Format Types 116
B Notices 117
Index 120
v
剩余128页未读,继续阅读













安全验证
文档复制为VIP权益,开通VIP直接复制

评论5