当前位置: 首页>>代码示例>>Python>>正文


Python StatValues.joinListsByAge方法代码示例

本文整理汇总了Python中StatValues.joinListsByAge方法的典型用法代码示例。如果您正苦于以下问题:Python StatValues.joinListsByAge方法的具体用法?Python StatValues.joinListsByAge怎么用?Python StatValues.joinListsByAge使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StatValues的用法示例。


在下文中一共展示了StatValues.joinListsByAge方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: compute21b

# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import joinListsByAge [as 别名]
def compute21b(subFolder, statData): # by age - q14
    print '\nComputing values for slide 2.1.2.'
    values = ParseInput.extractAnswers(statData, [14, 38,39])
    values = StatValues.joinListsByAge(values)

    yesNum = [ val.count('87') + val.count('88') for val in values ]
    noNum = [ val.count('89') + val.count('90') for val in values ]

    BuildTexts.addMacrosList(subFolder, 'valBAByesNum', yesNum)
    BuildTexts.addMacrosList(subFolder, 'valBABnoNum', noNum)

    BuildCharts.YesNoPieSVG(subFolder, 'pie212a.svg', yesNum[0], noNum[0])
    BuildCharts.YesNoPieSVG(subFolder, 'pie212b.svg', yesNum[1], noNum[1])
    BuildCharts.YesNoPieSVG(subFolder, 'pie212c.svg', yesNum[2], noNum[2])
    BuildCharts.YesNoPieSVG(subFolder, 'pie212d.svg', yesNum[3], noNum[3])
开发者ID:ryavorsky,项目名称:Direktor4web,代码行数:17,代码来源:StatValues2.py

示例2: compute22b

# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import joinListsByAge [as 别名]
def compute22b(subFolder, statData): # by age
    print '\nComputing values for slide 2.2.2.'
    values = ParseInput.extractAnswers(statData, [14, 28,29,46,47])
    values = StatValues.joinListsByAge(values)

    yesNum = [ val.count('83') + val.count('84') for val in values ]
    noNum = [ val.count('85') + val.count('86') for val in values ]

    BuildTexts.addMacrosList(subFolder, 'valBBByesNum', yesNum)
    BuildTexts.addMacrosList(subFolder, 'valBBBnoNum', noNum)

    BuildCharts.YesNoPieSVG(subFolder, 'pie222a.svg', yesNum[0], noNum[0])
    BuildCharts.YesNoPieSVG(subFolder, 'pie222b.svg', yesNum[1], noNum[1])
    BuildCharts.YesNoPieSVG(subFolder, 'pie222c.svg', yesNum[2], noNum[2])
    BuildCharts.YesNoPieSVG(subFolder, 'pie222d.svg', yesNum[3], noNum[3])
开发者ID:ryavorsky,项目名称:Direktor4web,代码行数:17,代码来源:StatValues2.py

示例3: compute31b

# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import joinListsByAge [as 别名]
def compute31b(subFolder, statData): # by age - q14
    print '\nComputing values for slide 3.1.2.'
    values = StatValues.extractAnswers(statData, [14, 43])
    values = StatValues.joinListsByAge(values)

    yesNum = [ val.count('103') + val.count('104') for val in values ]
    noNum = [ val.count('105') + val.count('106') for val in values ]

    BuildTex.addMacros(subFolder, 'valCAByesNumA', str(yesNum[0]))
    BuildTex.addMacros(subFolder, 'valCAByesNumB', str(yesNum[1]))
    BuildTex.addMacros(subFolder, 'valCAByesNumC', str(yesNum[2]))
    BuildTex.addMacros(subFolder, 'valCAByesNumD', str(yesNum[3]))
    BuildTex.addMacros(subFolder, 'valCABnoNumA', str(noNum[0]))
    BuildTex.addMacros(subFolder, 'valCABnoNumB', str(noNum[1]))
    BuildTex.addMacros(subFolder, 'valCABnoNumC', str(noNum[2]))
    BuildTex.addMacros(subFolder, 'valCABnoNumD', str(noNum[3]))

    BuildCharts.YesNoPie(subFolder + '\\pie312a.png', yesNum[0], noNum[0])
    BuildCharts.YesNoPie(subFolder + '\\pie312b.png', yesNum[1], noNum[1])
    BuildCharts.YesNoPie(subFolder + '\\pie312c.png', yesNum[2], noNum[2])
    BuildCharts.YesNoPie(subFolder + '\\pie312d.png', yesNum[3], noNum[3])
开发者ID:vlasova-evgeniya,项目名称:RPyAppl1,代码行数:23,代码来源:StatValues3.py

示例4: compute72

# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import joinListsByAge [as 别名]
def compute72(subFolder, statData):  # by age - q14
    print "\nComputing values for slide 7.2."
    values = StatValues.extractAnswers(statData, [14, 56, 57])
    values = StatValues.joinListsByAge(values)

    yesNum = [val.count("87") + val.count("88") for val in values]
    noNum = [val.count("89") + val.count("90") for val in values]

    BuildTex.addMacros(subFolder, "valGByesNumA", str(yesNum[0]))
    BuildTex.addMacros(subFolder, "valGByesNumB", str(yesNum[1]))
    BuildTex.addMacros(subFolder, "valGByesNumC", str(yesNum[2]))
    BuildTex.addMacros(subFolder, "valGByesNumD", str(yesNum[3]))
    BuildTex.addMacros(subFolder, "valGBnoNumA", str(noNum[0]))
    BuildTex.addMacros(subFolder, "valGBnoNumB", str(noNum[1]))
    BuildTex.addMacros(subFolder, "valGBnoNumC", str(noNum[2]))
    BuildTex.addMacros(subFolder, "valGBnoNumD", str(noNum[3]))

    BuildCharts.YesNoPie(subFolder + "\\pie72a.png", yesNum[0], noNum[0])
    BuildCharts.YesNoPie(subFolder + "\\pie72b.png", yesNum[1], noNum[1])
    BuildCharts.YesNoPie(subFolder + "\\pie72c.png", yesNum[2], noNum[2])
    BuildCharts.YesNoPie(subFolder + "\\pie72d.png", yesNum[3], noNum[3])
开发者ID:ryavorsky,项目名称:RPyAppl1,代码行数:23,代码来源:StatValues5.py

示例5: compute52

# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import joinListsByAge [as 别名]
def compute52(subFolder, statData): # by age - q14
    print '\nComputing values for slide 5.2.'
    values = ParseInput.extractAnswers(statData, [14, 56,57])
    values = StatValues.joinListsByAge(values)

    yesNum = [ val.count('87') + val.count('88') for val in values ]
    noNum = [ val.count('89') + val.count('90') for val in values ]

    BuildTexts.addMacro(subFolder, 'valGByesNumA', str(yesNum[0]))
    BuildTexts.addMacro(subFolder, 'valGByesNumB', str(yesNum[1]))
    BuildTexts.addMacro(subFolder, 'valGByesNumC', str(yesNum[2]))
    BuildTexts.addMacro(subFolder, 'valGByesNumD', str(yesNum[3]))
    BuildTexts.addMacro(subFolder, 'valGBnoNumA', str(noNum[0]))
    BuildTexts.addMacro(subFolder, 'valGBnoNumB', str(noNum[1]))
    BuildTexts.addMacro(subFolder, 'valGBnoNumC', str(noNum[2]))
    BuildTexts.addMacro(subFolder, 'valGBnoNumD', str(noNum[3]))

    BuildCharts.YesNoPieSVG(subFolder,'pie52a.svg', yesNum[0], noNum[0])
    BuildCharts.YesNoPieSVG(subFolder,'pie52b.svg', yesNum[1], noNum[1])
    BuildCharts.YesNoPieSVG(subFolder,'pie52c.svg', yesNum[2], noNum[2])
    BuildCharts.YesNoPieSVG(subFolder,'pie52d.svg', yesNum[3], noNum[3])
开发者ID:ryavorsky,项目名称:Direktor4web,代码行数:23,代码来源:StatValues5.py

示例6: compute32b

# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import joinListsByAge [as 别名]
def compute32b(subFolder, statData): # by age - q14
    print '\nComputing values for slide 3.2.2.'
    values = ParseInput.extractAnswers(statData, [14, 40,41,42])
    values = StatValues.joinListsByAge(values)

    yesNum = [ val.count('99') + val.count('100') for val in values ]
    noNum = [ val.count('101') + val.count('102') for val in values ]

    BuildTexts.addMacro(subFolder, 'valCBByesNumA', str(yesNum[0]))
    BuildTexts.addMacro(subFolder, 'valCBByesNumB', str(yesNum[1]))
    BuildTexts.addMacro(subFolder, 'valCBByesNumC', str(yesNum[2]))
    BuildTexts.addMacro(subFolder, 'valCBByesNumD', str(yesNum[3]))
    BuildTexts.addMacro(subFolder, 'valCBBnoNumA', str(noNum[0]))
    BuildTexts.addMacro(subFolder, 'valCBBnoNumB', str(noNum[1]))
    BuildTexts.addMacro(subFolder, 'valCBBnoNumC', str(noNum[2]))
    BuildTexts.addMacro(subFolder, 'valCBBnoNumD', str(noNum[3]))

    BuildCharts.YesNoPieSVG(subFolder, 'pie322a.svg', yesNum[0], noNum[0])
    BuildCharts.YesNoPieSVG(subFolder, 'pie322b.svg', yesNum[1], noNum[1])
    BuildCharts.YesNoPieSVG(subFolder, 'pie322c.svg', yesNum[2], noNum[2])
    BuildCharts.YesNoPieSVG(subFolder, 'pie322d.svg', yesNum[3], noNum[3])
开发者ID:ryavorsky,项目名称:Direktor4web,代码行数:23,代码来源:StatValues3.py

示例7: compute22b

# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import joinListsByAge [as 别名]
def compute22b(subFolder, statData): # by age
    print '\nComputing values for slide 2.2.2.'
    values = StatValues.extractAnswers(statData, [14, 28,29,46,47])
    values = StatValues.joinListsByAge(values)

    yesNum = [ val.count('83') + val.count('84') for val in values ]
    noNum = [ val.count('85') + val.count('86') for val in values ]

    BuildTex.addMacros(subFolder, 'valBBByesNumA', str(yesNum[0]))
    BuildTex.addMacros(subFolder, 'valBBByesNumB', str(yesNum[1]))
    BuildTex.addMacros(subFolder, 'valBBByesNumC', str(yesNum[2]))
    BuildTex.addMacros(subFolder, 'valBBByesNumD', str(yesNum[3]))

    BuildTex.addMacros(subFolder, 'valBBBnoNumA', str(noNum[0]))
    BuildTex.addMacros(subFolder, 'valBBBnoNumB', str(noNum[1]))
    BuildTex.addMacros(subFolder, 'valBBBnoNumC', str(noNum[2]))
    BuildTex.addMacros(subFolder, 'valBBBnoNumD', str(noNum[3]))

    BuildCharts.YesNoPie(subFolder + '\\pie222a.png', yesNum[0], noNum[0])
    BuildCharts.YesNoPie(subFolder + '\\pie222b.png', yesNum[1], noNum[1])
    BuildCharts.YesNoPie(subFolder + '\\pie222c.png', yesNum[2], noNum[2])
    BuildCharts.YesNoPie(subFolder + '\\pie222d.png', yesNum[3], noNum[3])
开发者ID:vlasova-evgeniya,项目名称:RPyAppl1,代码行数:24,代码来源:StatValues2.py


注:本文中的StatValues.joinListsByAge方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。