本文整理汇总了Python中StatValues.joinLists方法的典型用法代码示例。如果您正苦于以下问题:Python StatValues.joinLists方法的具体用法?Python StatValues.joinLists怎么用?Python StatValues.joinLists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StatValues
的用法示例。
在下文中一共展示了StatValues.joinLists方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: compute21a
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import joinLists [as 别名]
def compute21a(subFolder, statData): # aggregate
print '\nComputing values for slide 2.1.1.'
values = ParseInput.extractAnswers(statData, [38,39])
values = StatValues.joinLists(values)
yesNum = values.count('87') + values.count('88')
noNum = values.count('89') + values.count('90')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTexts.addMacro(subFolder, 'valBAAyesNumP', str(yesNumP))
BuildTexts.addMacro(subFolder, 'valBAAnoNumP', str(noNumP))
BuildCharts.YesNoPieSVG(subFolder, 'pie211.svg', yesNumP, noNumP)
示例2: compute22a
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import joinLists [as 别名]
def compute22a(subFolder, statData): # aggregate
print '\nComputing values for slide 2.2.1.'
values = ParseInput.extractAnswers(statData, [28,29,46,47])
values = StatValues.joinLists(values)
yesNum = values.count('83') + values.count('84')
noNum = values.count('85') + values.count('86')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTexts.addMacro(subFolder, 'valBBAyesNumP', str(yesNumP))
BuildTexts.addMacro(subFolder, 'valBBAnoNumP', str(noNumP))
BuildCharts.YesNoPieSVG(subFolder, 'pie221.svg', yesNumP, noNumP)
示例3: compute32a
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import joinLists [as 别名]
def compute32a(subFolder, statData): # aggregate
print '\nComputing values for slide 3.2.1.'
values = StatValues.extractAnswers(statData, [40,41,42])
values = StatValues.joinLists(values)
yesNum = values.count('99') + values.count('100')
noNum = values.count('101') + values.count('102')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTex.addMacros(subFolder, 'valCBAyesNum', str(yesNum))
BuildTex.addMacros(subFolder, 'valCBAnoNum', str(noNum))
BuildTex.addMacros(subFolder, 'valCBAyesNumP', str(yesNumP))
BuildTex.addMacros(subFolder, 'valCBAnoNumP', str(noNumP))
BuildCharts.YesNoPie(subFolder + '\\pie321.png', yesNum, noNum)
示例4: compute71
# 需要导入模块: import StatValues [as 别名]
# 或者: from StatValues import joinLists [as 别名]
def compute71(subFolder, statData): # aggregate
print "\nComputing values for slide 7.1."
values = StatValues.extractAnswers(statData, [56, 57])
values = StatValues.joinLists(values)
yesNum = values.count("87") + values.count("88")
noNum = values.count("89") + values.count("90")
[yesNumP, noNumP] = StatValues.percent([yesNum, noNum])
BuildTex.addMacros(subFolder, "valGAyesNum", str(yesNum))
BuildTex.addMacros(subFolder, "valGAnoNum", str(noNum))
BuildTex.addMacros(subFolder, "valGAyesNumP", str(yesNumP))
BuildTex.addMacros(subFolder, "valGAnoNumP", str(noNumP))
BuildCharts.YesNoPie(subFolder + "\\pie71.png", yesNumP, noNumP)