source: orange/docs/tutorial/rst/code/data-instances2.py @ 11052:c22077a09e63

Revision 11052:c22077a09e63, 228 bytes checked in by blaz <blaz.zupan@…>, 16 months ago (diff)

new tutorial

Line 
1import Orange
2
3average = lambda xs: sum(xs)/float(len(xs))
4
5data = Orange.data.Table("iris")
6print "%-15s %s" % ("Feature", "Mean")
7for x in data.domain.features:
8    print "%-15s %.2f" % (x.name, average([d[x] for d in data]))
Note: See TracBrowser for help on using the repository browser.