| Revision 526:fe2d65da2b2a,
421 bytes
checked in by janezd <janez.demsar@…>, 9 years ago
(diff) |
- moved documentation from a separate module to this one
|
| Line | |
|---|
| 1 | # Author: B Zupan |
|---|
| 2 | # Version: 1.0 |
|---|
| 3 | # Description: Read data, list attributes and class values, print first few data instances |
|---|
| 4 | # Category: description |
|---|
| 5 | # Uses: lenses.tab |
|---|
| 6 | |
|---|
| 7 | import orange |
|---|
| 8 | data = orange.ExampleTable("lenses") |
|---|
| 9 | print "Attributes:", |
|---|
| 10 | for i in data.domain.attributes: |
|---|
| 11 | print i.name, |
|---|
| 12 | print |
|---|
| 13 | print "Class:", data.domain.classVar.name |
|---|
| 14 | |
|---|
| 15 | print "First 5 data items:" |
|---|
| 16 | for i in range(5): |
|---|
| 17 | print data[i] |
|---|
Note: See
TracBrowser
for help on using the repository browser.