File: statistics.py

package info (click to toggle)
python-petl 1.7.17-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,224 kB
  • sloc: python: 22,617; makefile: 109; xml: 9
file content (26 lines) | stat: -rw-r--r-- 449 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from __future__ import division, print_function, absolute_import


# limits()
##########

import petl as etl
table = [['foo', 'bar'], ['a', 1], ['b', 2], ['b', 3]]
minv, maxv = etl.limits(table, 'bar')
minv
maxv


# stats()
#########

import petl as etl
table = [['foo', 'bar', 'baz'],
         ['A', 1, 2],
         ['B', '2', '3.4'],
         [u'B', u'3', u'7.8', True],
         ['D', 'xyz', 9.0],
         ['E', None]]
etl.stats(table, 'bar')