當前位置: 首頁>>代碼示例>>Python>>正文


Python StatValues.joinLists方法代碼示例

本文整理匯總了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)
開發者ID:ryavorsky,項目名稱:Direktor4web,代碼行數:15,代碼來源:StatValues2.py

示例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)
開發者ID:ryavorsky,項目名稱:Direktor4web,代碼行數:15,代碼來源:StatValues2.py

示例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)
開發者ID:vlasova-evgeniya,項目名稱:RPyAppl1,代碼行數:17,代碼來源:StatValues3.py

示例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)
開發者ID:ryavorsky,項目名稱:RPyAppl1,代碼行數:17,代碼來源:StatValues5.py


注:本文中的StatValues.joinLists方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。