source: orange/orange/doc/ofb/domain1.py @ 6538:a5f65d7f0b2c

Revision 6538:a5f65d7f0b2c, 530 bytes checked in by Mitar <Mitar@…>, 4 years ago (diff)

Made XPM version of the icon 32x32.

Line 
1# Description: Reads a data set, prints out attribute and class names
2# Category:    preprocessing
3# Uses:        imports-85
4# Referenced:  domain.htm
5
6import orange
7
8filename = "imports-85.tab"
9data = orange.ExampleTable(filename)
10print "%s includes %i attributes and a class variable %s" % \
11  (filename, len(data.domain.attributes), data.domain.classVar.name)
12
13print "Attribute names and indices:"
14for i in range(len(data.domain.attributes)):
15  print "(%2d) %-17s" % (i, data.domain.attributes[i].name),
16  if i % 3 == 2: print
Note: See TracBrowser for help on using the repository browser.