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


Python StatValues.joinListsByQuestion方法代碼示例

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


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

示例1: compute22d

# 需要導入模塊: import StatValues [as 別名]
# 或者: from StatValues import joinListsByQuestion [as 別名]
def compute22d(subFolder, statData): # by question
    print '\nComputing values for slide 2.2.4.'
    values = ParseInput.extractAnswers(statData, [28,29,46,47])
    values = StatValues.joinListsByQuestion(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, 'valBBDyesNum', yesNum)
    BuildTexts.addMacrosList(subFolder, 'valBBDnoNum', noNum)

    BuildCharts.YesNoPieSVG(subFolder, 'pie224a.svg', yesNum[0], noNum[0])
    BuildCharts.YesNoPieSVG(subFolder, 'pie224b.svg', yesNum[1], noNum[1])
    BuildCharts.YesNoPieSVG(subFolder, 'pie224c.svg', yesNum[2], noNum[2])
    BuildCharts.YesNoPieSVG(subFolder, 'pie224d.svg', yesNum[3], noNum[3])
開發者ID:ryavorsky,項目名稱:Direktor4web,代碼行數:17,代碼來源:StatValues2.py

示例2: compute74

# 需要導入模塊: import StatValues [as 別名]
# 或者: from StatValues import joinListsByQuestion [as 別名]
def compute74(subFolder, statData):  # by question
    print "\nComputing values for slide 7.4."
    values = StatValues.extractAnswers(statData, [56, 57])
    values = StatValues.joinListsByQuestion(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, "valGDyesNumA", str(yesNum[0]))
    BuildTex.addMacros(subFolder, "valGDyesNumB", str(yesNum[1]))
    BuildTex.addMacros(subFolder, "valGDnoNumA", str(noNum[0]))
    BuildTex.addMacros(subFolder, "valGDnoNumB", str(noNum[1]))

    BuildCharts.YesNoPie(subFolder + "\\pie74a.png", yesNum[0], noNum[0])
    BuildCharts.YesNoPie(subFolder + "\\pie74b.png", yesNum[1], noNum[1])
開發者ID:ryavorsky,項目名稱:RPyAppl1,代碼行數:17,代碼來源:StatValues5.py

示例3: compute54

# 需要導入模塊: import StatValues [as 別名]
# 或者: from StatValues import joinListsByQuestion [as 別名]
def compute54(subFolder, statData): # by question
    print '\nComputing values for slide 5.4.'
    values = ParseInput.extractAnswers(statData, [56,57])
    values = StatValues.joinListsByQuestion(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, 'valGDyesNumA', str(yesNum[0]))
    BuildTexts.addMacro(subFolder, 'valGDyesNumB', str(yesNum[1]))
    BuildTexts.addMacro(subFolder, 'valGDnoNumA', str(noNum[0]))
    BuildTexts.addMacro(subFolder, 'valGDnoNumB', str(noNum[1]))

    BuildCharts.YesNoPieSVG(subFolder,'pie54a.svg', yesNum[0], noNum[0])
    BuildCharts.YesNoPieSVG(subFolder,'pie54b.svg', yesNum[1], noNum[1])
開發者ID:ryavorsky,項目名稱:Direktor4web,代碼行數:17,代碼來源:StatValues5.py

示例4: compute21d

# 需要導入模塊: import StatValues [as 別名]
# 或者: from StatValues import joinListsByQuestion [as 別名]
def compute21d(subFolder, statData): # by question
    print '\nComputing values for slide 2.1.4.'
    values = ParseInput.extractAnswers(statData, [35,38,39,50,55])
    values = StatValues.joinListsByQuestion(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, 'valBADyesNum', yesNum)
    BuildTexts.addMacrosList(subFolder, 'valBADnoNum', noNum)

    BuildCharts.YesNoPieSVG(subFolder, 'pie214a.svg', yesNum[0], noNum[0])
    BuildCharts.YesNoPieSVG(subFolder, 'pie214b.svg', yesNum[1], noNum[1])
    BuildCharts.YesNoPieSVG(subFolder, 'pie214c.svg', yesNum[2], noNum[2])
    BuildCharts.YesNoPieSVG(subFolder, 'pie214d.svg', yesNum[3], noNum[3])
    BuildCharts.YesNoPieSVG(subFolder, 'pie214e.svg', yesNum[4], noNum[4])
開發者ID:ryavorsky,項目名稱:Direktor4web,代碼行數:18,代碼來源:StatValues2.py

示例5: compute32d

# 需要導入模塊: import StatValues [as 別名]
# 或者: from StatValues import joinListsByQuestion [as 別名]
def compute32d(subFolder, statData): # by question
    print '\nComputing values for slide 3.2.4.'
    values = StatValues.extractAnswers(statData, [40,41,42])
    values = StatValues.joinListsByQuestion(values)

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

    BuildTex.addMacros(subFolder, 'valCBDyesNumA', str(yesNum[0]))
    BuildTex.addMacros(subFolder, 'valCBDyesNumB', str(yesNum[1]))
    BuildTex.addMacros(subFolder, 'valCBDyesNumC', str(yesNum[2]))
    BuildTex.addMacros(subFolder, 'valCBDnoNumA', str(noNum[0]))
    BuildTex.addMacros(subFolder, 'valCBDnoNumB', str(noNum[1]))
    BuildTex.addMacros(subFolder, 'valCBDnoNumC', str(noNum[2]))

    BuildCharts.YesNoPie(subFolder + '\\pie324a.png', yesNum[0], noNum[0])
    BuildCharts.YesNoPie(subFolder + '\\pie324b.png', yesNum[1], noNum[1])
    BuildCharts.YesNoPie(subFolder + '\\pie324c.png', yesNum[2], noNum[2])
開發者ID:vlasova-evgeniya,項目名稱:RPyAppl1,代碼行數:20,代碼來源:StatValues3.py

示例6: compute22d

# 需要導入模塊: import StatValues [as 別名]
# 或者: from StatValues import joinListsByQuestion [as 別名]
def compute22d(subFolder, statData): # by question
    print '\nComputing values for slide 2.2.4.'
    values = StatValues.extractAnswers(statData, [28,29,46,47])
    values = StatValues.joinListsByQuestion(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, 'valBBDyesNumA', str(yesNum[0]))
    BuildTex.addMacros(subFolder, 'valBBDyesNumB', str(yesNum[1]))
    BuildTex.addMacros(subFolder, 'valBBDyesNumC', str(yesNum[2]))
    BuildTex.addMacros(subFolder, 'valBBDyesNumD', str(yesNum[3]))
    BuildTex.addMacros(subFolder, 'valBBDnoNumA', str(noNum[0]))
    BuildTex.addMacros(subFolder, 'valBBDnoNumB', str(noNum[1]))
    BuildTex.addMacros(subFolder, 'valBBDnoNumC', str(noNum[2]))
    BuildTex.addMacros(subFolder, 'valBBDnoNumD', str(noNum[3]))

    BuildCharts.YesNoPie(subFolder + '\\pie224a.png', yesNum[0], noNum[0])
    BuildCharts.YesNoPie(subFolder + '\\pie224b.png', yesNum[1], noNum[1])
    BuildCharts.YesNoPie(subFolder + '\\pie224c.png', yesNum[2], noNum[2])
    BuildCharts.YesNoPie(subFolder + '\\pie224d.png', yesNum[3], noNum[3])
開發者ID:vlasova-evgeniya,項目名稱:RPyAppl1,代碼行數:23,代碼來源:StatValues2.py

示例7: compute21d

# 需要導入模塊: import StatValues [as 別名]
# 或者: from StatValues import joinListsByQuestion [as 別名]
def compute21d(subFolder, statData): # by question
    print '\nComputing values for slide 2.1.4.'
    values = StatValues.extractAnswers(statData, [35,38,39,50,55])
    values = StatValues.joinListsByQuestion(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, 'valBADyesNumA', str(yesNum[0]))
    BuildTex.addMacros(subFolder, 'valBADyesNumB', str(yesNum[1]))
    BuildTex.addMacros(subFolder, 'valBADyesNumC', str(yesNum[2]))
    BuildTex.addMacros(subFolder, 'valBADyesNumD', str(yesNum[3]))
    BuildTex.addMacros(subFolder, 'valBADyesNumE', str(yesNum[4]))
    BuildTex.addMacros(subFolder, 'valBADnoNumA', str(noNum[0]))
    BuildTex.addMacros(subFolder, 'valBADnoNumB', str(noNum[1]))
    BuildTex.addMacros(subFolder, 'valBADnoNumC', str(noNum[2]))
    BuildTex.addMacros(subFolder, 'valBADnoNumD', str(noNum[3]))
    BuildTex.addMacros(subFolder, 'valBADnoNumE', str(noNum[4]))

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


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