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


Python StatValues.joinListsByCategory方法代碼示例

本文整理匯總了Python中StatValues.joinListsByCategory方法的典型用法代碼示例。如果您正苦於以下問題:Python StatValues.joinListsByCategory方法的具體用法?Python StatValues.joinListsByCategory怎麽用?Python StatValues.joinListsByCategory使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在StatValues的用法示例。


在下文中一共展示了StatValues.joinListsByCategory方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: compute21c

# 需要導入模塊: import StatValues [as 別名]
# 或者: from StatValues import joinListsByCategory [as 別名]
def compute21c(subFolder, statData): # by category - q19
    print '\nComputing values for slide 2.1.3.'
    values = ParseInput.extractAnswers(statData, [19, 38,39])
    values = StatValues.joinListsByCategory(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, 'valBACyesNum', yesNum)
    BuildTexts.addMacrosList(subFolder, 'valBACnoNum', noNum)

    BuildCharts.YesNoPieSVG(subFolder, 'pie213a.svg', yesNum[0], noNum[0])
    BuildCharts.YesNoPieSVG(subFolder, 'pie213b.svg', yesNum[1], noNum[1])
    BuildCharts.YesNoPieSVG(subFolder, 'pie213c.svg', yesNum[2], noNum[2])
    BuildCharts.YesNoPieSVG(subFolder, 'pie213d.svg', yesNum[3], noNum[3])
    BuildCharts.YesNoPieSVG(subFolder, 'pie213e.svg', yesNum[4], noNum[4])
開發者ID:ryavorsky,項目名稱:Direktor4web,代碼行數:18,代碼來源:StatValues2.py

示例2: compute22c

# 需要導入模塊: import StatValues [as 別名]
# 或者: from StatValues import joinListsByCategory [as 別名]
def compute22c(subFolder, statData): # by category - q19
    print '\nComputing values for slide 2.2.3.'
    values = ParseInput.extractAnswers(statData, [19, 28,29,46,47])
    values = StatValues.joinListsByCategory(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, 'valBBCyesNum', yesNum)
    BuildTexts.addMacrosList(subFolder, 'valBBCnoNum', noNum)

    BuildCharts.YesNoPieSVG(subFolder, 'pie223a.svg', yesNum[0], noNum[0])
    BuildCharts.YesNoPieSVG(subFolder, 'pie223b.svg', yesNum[1], noNum[1])
    BuildCharts.YesNoPieSVG(subFolder, 'pie223c.svg', yesNum[2], noNum[2])
    BuildCharts.YesNoPieSVG(subFolder, 'pie223d.svg', yesNum[3], noNum[3])
    BuildCharts.YesNoPieSVG(subFolder, 'pie223e.svg', yesNum[4], noNum[4])
開發者ID:ryavorsky,項目名稱:Direktor4web,代碼行數:18,代碼來源:StatValues2.py

示例3: compute21c

# 需要導入模塊: import StatValues [as 別名]
# 或者: from StatValues import joinListsByCategory [as 別名]
def compute21c(subFolder, statData): # by category - q19
    print '\nComputing values for slide 2.1.3.'
    values = StatValues.extractAnswers(statData, [19, 38,39])
    values = StatValues.joinListsByCategory(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, 'valBACyesNumA', str(yesNum[0]))
    BuildTex.addMacros(subFolder, 'valBACyesNumB', str(yesNum[1]))
    BuildTex.addMacros(subFolder, 'valBACyesNumC', str(yesNum[2]))
    BuildTex.addMacros(subFolder, 'valBACyesNumD', str(yesNum[3]))
    BuildTex.addMacros(subFolder, 'valBACyesNumE', str(yesNum[4]))
    BuildTex.addMacros(subFolder, 'valBACnoNumA', str(noNum[0]))
    BuildTex.addMacros(subFolder, 'valBACnoNumB', str(noNum[1]))
    BuildTex.addMacros(subFolder, 'valBACnoNumC', str(noNum[2]))
    BuildTex.addMacros(subFolder, 'valBACnoNumD', str(noNum[3]))
    BuildTex.addMacros(subFolder, 'valBACnoNumE', str(noNum[4]))

    BuildCharts.YesNoPie(subFolder + '\\pie213a.png', yesNum[0], noNum[0])
    BuildCharts.YesNoPie(subFolder + '\\pie213b.png', yesNum[1], noNum[1])
    BuildCharts.YesNoPie(subFolder + '\\pie213c.png', yesNum[2], noNum[2])
    BuildCharts.YesNoPie(subFolder + '\\pie213d.png', yesNum[3], noNum[3])
    BuildCharts.YesNoPie(subFolder + '\\pie213e.png', yesNum[4], noNum[4])
開發者ID:vlasova-evgeniya,項目名稱:RPyAppl1,代碼行數:26,代碼來源:StatValues2.py

示例4: compute22c

# 需要導入模塊: import StatValues [as 別名]
# 或者: from StatValues import joinListsByCategory [as 別名]
def compute22c(subFolder, statData): # by category - q19
    print '\nComputing values for slide 2.2.3.'
    values = StatValues.extractAnswers(statData, [19, 28,29,46,47])
    values = StatValues.joinListsByCategory(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, 'valBBCyesNumA', str(yesNum[0]))
    BuildTex.addMacros(subFolder, 'valBBCyesNumB', str(yesNum[1]))
    BuildTex.addMacros(subFolder, 'valBBCyesNumC', str(yesNum[2]))
    BuildTex.addMacros(subFolder, 'valBBCyesNumD', str(yesNum[3]))
    BuildTex.addMacros(subFolder, 'valBBCyesNumE', str(yesNum[4]))
    BuildTex.addMacros(subFolder, 'valBBCnoNumA', str(noNum[0]))
    BuildTex.addMacros(subFolder, 'valBBCnoNumB', str(noNum[1]))
    BuildTex.addMacros(subFolder, 'valBBCnoNumC', str(noNum[2]))
    BuildTex.addMacros(subFolder, 'valBBCnoNumD', str(noNum[3]))
    BuildTex.addMacros(subFolder, 'valBBCnoNumE', str(noNum[4]))

    BuildCharts.YesNoPie(subFolder + '\\pie223a.png', yesNum[0], noNum[0])
    BuildCharts.YesNoPie(subFolder + '\\pie223b.png', yesNum[1], noNum[1])
    BuildCharts.YesNoPie(subFolder + '\\pie223c.png', yesNum[2], noNum[2])
    BuildCharts.YesNoPie(subFolder + '\\pie223d.png', yesNum[3], noNum[3])
    BuildCharts.YesNoPie(subFolder + '\\pie223e.png', yesNum[4], noNum[4])
開發者ID:vlasova-evgeniya,項目名稱:RPyAppl1,代碼行數:26,代碼來源:StatValues2.py

示例5: compute73

# 需要導入模塊: import StatValues [as 別名]
# 或者: from StatValues import joinListsByCategory [as 別名]
def compute73(subFolder, statData):  # by category - q19
    print "\nComputing values for slide 7.3."
    values = StatValues.extractAnswers(statData, [19, 56, 57])
    values = StatValues.joinListsByCategory(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, "valGCyesNumA", str(yesNum[0]))
    BuildTex.addMacros(subFolder, "valGCyesNumB", str(yesNum[1]))
    BuildTex.addMacros(subFolder, "valGCyesNumC", str(yesNum[2]))
    BuildTex.addMacros(subFolder, "valGCyesNumD", str(yesNum[3]))
    BuildTex.addMacros(subFolder, "valGCyesNumE", str(yesNum[4]))
    BuildTex.addMacros(subFolder, "valGCnoNumA", str(noNum[0]))
    BuildTex.addMacros(subFolder, "valGCnoNumB", str(noNum[1]))
    BuildTex.addMacros(subFolder, "valGCnoNumC", str(noNum[2]))
    BuildTex.addMacros(subFolder, "valGCnoNumD", str(noNum[3]))
    BuildTex.addMacros(subFolder, "valGCnoNumE", str(noNum[4]))

    BuildCharts.YesNoPie(subFolder + "\\pie73a.png", yesNum[0], noNum[0])
    BuildCharts.YesNoPie(subFolder + "\\pie73b.png", yesNum[1], noNum[1])
    BuildCharts.YesNoPie(subFolder + "\\pie73c.png", yesNum[2], noNum[2])
    BuildCharts.YesNoPie(subFolder + "\\pie73d.png", yesNum[3], noNum[3])
    BuildCharts.YesNoPie(subFolder + "\\pie73e.png", yesNum[4], noNum[4])
開發者ID:ryavorsky,項目名稱:RPyAppl1,代碼行數:26,代碼來源:StatValues5.py

示例6: compute53

# 需要導入模塊: import StatValues [as 別名]
# 或者: from StatValues import joinListsByCategory [as 別名]
def compute53(subFolder, statData): # by category - q19
    print '\nComputing values for slide 5.3.'
    values = ParseInput.extractAnswers(statData, [19, 56,57])
    values = StatValues.joinListsByCategory(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, 'valGCyesNumA', str(yesNum[0]))
    BuildTexts.addMacro(subFolder, 'valGCyesNumB', str(yesNum[1]))
    BuildTexts.addMacro(subFolder, 'valGCyesNumC', str(yesNum[2]))
    BuildTexts.addMacro(subFolder, 'valGCyesNumD', str(yesNum[3]))
    BuildTexts.addMacro(subFolder, 'valGCyesNumE', str(yesNum[4]))
    BuildTexts.addMacro(subFolder, 'valGCnoNumA', str(noNum[0]))
    BuildTexts.addMacro(subFolder, 'valGCnoNumB', str(noNum[1]))
    BuildTexts.addMacro(subFolder, 'valGCnoNumC', str(noNum[2]))
    BuildTexts.addMacro(subFolder, 'valGCnoNumD', str(noNum[3]))
    BuildTexts.addMacro(subFolder, 'valGCnoNumE', str(noNum[4]))

    BuildCharts.YesNoPieSVG(subFolder,'pie53a.svg', yesNum[0], noNum[0])
    BuildCharts.YesNoPieSVG(subFolder,'pie53b.svg', yesNum[1], noNum[1])
    BuildCharts.YesNoPieSVG(subFolder,'pie53c.svg', yesNum[2], noNum[2])
    BuildCharts.YesNoPieSVG(subFolder,'pie53d.svg', yesNum[3], noNum[3])
    BuildCharts.YesNoPieSVG(subFolder,'pie53e.svg', yesNum[4], noNum[4])
開發者ID:ryavorsky,項目名稱:Direktor4web,代碼行數:26,代碼來源:StatValues5.py

示例7: compute31c

# 需要導入模塊: import StatValues [as 別名]
# 或者: from StatValues import joinListsByCategory [as 別名]
def compute31c(subFolder, statData): # by category - q19
    print '\nComputing values for slide 3.1.3.'
    values = ParseInput.extractAnswers(statData, [19, 43])
    values = StatValues.joinListsByCategory(values)

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

    BuildTexts.addMacro(subFolder, 'valCACyesNumA', str(yesNum[0]))
    BuildTexts.addMacro(subFolder, 'valCACyesNumB', str(yesNum[1]))
    BuildTexts.addMacro(subFolder, 'valCACyesNumC', str(yesNum[2]))
    BuildTexts.addMacro(subFolder, 'valCACyesNumD', str(yesNum[3]))
    BuildTexts.addMacro(subFolder, 'valCACyesNumE', str(yesNum[4]))
    BuildTexts.addMacro(subFolder, 'valCACnoNumA', str(noNum[0]))
    BuildTexts.addMacro(subFolder, 'valCACnoNumB', str(noNum[1]))
    BuildTexts.addMacro(subFolder, 'valCACnoNumC', str(noNum[2]))
    BuildTexts.addMacro(subFolder, 'valCACnoNumD', str(noNum[3]))
    BuildTexts.addMacro(subFolder, 'valCACnoNumE', str(noNum[4]))

    BuildCharts.YesNoPieSVG(subFolder, 'pie313a.svg', yesNum[0], noNum[0])
    BuildCharts.YesNoPieSVG(subFolder, 'pie313b.svg', yesNum[1], noNum[1])
    BuildCharts.YesNoPieSVG(subFolder, 'pie313c.svg', yesNum[2], noNum[2])
    BuildCharts.YesNoPieSVG(subFolder, 'pie313d.svg', yesNum[3], noNum[3])
    BuildCharts.YesNoPieSVG(subFolder, 'pie313e.svg', yesNum[4], noNum[4])
開發者ID:ryavorsky,項目名稱:Direktor4web,代碼行數:26,代碼來源:StatValues3.py


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