source: orange/orange/doc/Orange/rst/code/distributions-basic-stat.py @ 7390:4107672bd4f7

Revision 7390:4107672bd4f7, 319 bytes checked in by lan <lan@…>, 3 years ago (diff)

Documentation scripts for distributions module.

Line 
1import Orange
2import distributions
3
4myData = Orange.data.Table("iris.tab")
5bas = distributions.DomainBasicAttrStat(myData) 
6
7print "%20s %5s %5s %5s" % ("feature", "min", "max", "avg")
8for a in bas:
9    if a:
10        print "%20s %5.3f %5.3f %5.3f" % (a.variable.name, a.min, a.max, a.avg)
11
12print bas["sepal length"].avg
Note: See TracBrowser for help on using the repository browser.