source: orange/docs/reference/rst/code/distributions-basic-stat.py @ 9638:eb3af38491f2

Revision 9638:eb3af38491f2, 291 bytes checked in by umek@…, 2 years ago (diff)

Changed table to data or name of the data set.

For example - instead of

table = Orange.data.Table("housing")

is changed to

housing = Orange.data.Table("housing")

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