本文整理汇总了Python中pyvttbl.DataFrame.descriptives方法的典型用法代码示例。如果您正苦于以下问题:Python DataFrame.descriptives方法的具体用法?Python DataFrame.descriptives怎么用?Python DataFrame.descriptives使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyvttbl.DataFrame
的用法示例。
在下文中一共展示了DataFrame.descriptives方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test11
# 需要导入模块: from pyvttbl import DataFrame [as 别名]
# 或者: from pyvttbl.DataFrame import descriptives [as 别名]
def test11(self):
df = DataFrame()
df.read_tbl('data/error~subjectXtimeofdayXcourseXmodel_MISSING.csv')
D = str(df.descriptives('ERROR'))
R = """\
Descriptive Statistics
ERROR
==========================
count 48.000
mean 3.896
mode 3.000
var 5.797
stdev 2.408
sem 0.348
rms 4.567
min 0.000
Q1 2.000
median 3.000
Q3 5.000
max 10.000
range 10.000
95ci_lower 3.215
95ci_upper 4.577 """
self.assertEqual(D, R)
示例2: test01
# 需要导入模块: from pyvttbl import DataFrame [as 别名]
# 或者: from pyvttbl.DataFrame import descriptives [as 别名]
def test01(self):
"""repr test"""
R = Descriptives([('count', 100.0),
('mean', 11.61),
('mode', 11.0),
('var', 26.947373737373752),
('stdev', 5.191085988246944),
('sem', 0.5191085988246944),
('rms', 12.707084638106414),
('min', 3.0),
('Q1', 7.0),
('median', 11.0),
('Q3', 15.5),
('max', 23.0),
('range', 20.0),
('95ci_lower', 10.592547146303598),
('95ci_upper', 12.6274528536964)],
cname='WORDS')
df = DataFrame()
df.read_tbl('data/words~ageXcondition.csv')
D = eval(repr(df.descriptives('WORDS')))
for k in D.keys():
self.failUnlessAlmostEqual(D[k],R[k])
示例3: test1
# 需要导入模块: from pyvttbl import DataFrame [as 别名]
# 或者: from pyvttbl.DataFrame import descriptives [as 别名]
def test1(self):
R = Descriptives([('count', 48.0),
('mean', 3.8958333333333335),
('mode', 3.0),
('var', 5.797429078014184),
('stdev', 2.4077850979716158),
('sem', 0.34753384361617046),
('rms', 4.566636252940086),
('min', 0.0),
('Q1', 2.0),
('median', 3.0),
('Q3', 5.0),
('max', 10.0),
('range', 10.0),
('95ci_lower', 3.2146669998456394),
('95ci_upper', 4.5769996668210275)],
cname='ERROR')
df=DataFrame()
df.read_tbl('data/error~subjectXtimeofdayXcourseXmodel_MISSING.csv')
D=df.descriptives('ERROR')
for k in D.keys():
self.failUnlessAlmostEqual(D[k],R[k])
示例4: test02
# 需要导入模块: from pyvttbl import DataFrame [as 别名]
# 或者: from pyvttbl.DataFrame import descriptives [as 别名]
def test02(self):
df = DataFrame()
df.read_tbl('data/words~ageXcondition.csv')
D = str(df.descriptives('WORDS'))
R = """\
Descriptive Statistics
WORDS
==========================
count 100.000
mean 11.610
mode 11.000
var 26.947
stdev 5.191
sem 0.519
rms 12.707
min 3.000
Q1 7.000
median 11.000
Q3 15.500
max 23.000
range 20.000
95ci_lower 10.593
95ci_upper 12.627 """
self.assertEqual(D, R)