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

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

new tutorial

Line 
1import Orange
2data = Orange.data.Table("lenses")
3print "Attributes:", ", ".join(x.name for x in data.domain.features)
4print "Class:", data.domain.class_var.name
5print "Data instances", len(data)
6
7target = "soft"
8print "Data instances with %s prescriptions:" % target
9for d in data:
10    if d.get_class() == target:
11        print " ".join(["%-15s" % str(v) for v in d])
12
Note: See TracBrowser for help on using the repository browser.