source: orange/docs/reference/rst/code/data.io-write.weka.py @ 9638:eb3af38491f2

Revision 9638:eb3af38491f2, 361 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 
1# Description: Export to Weka ARFF format
2# Category:    data
3# Uses:        iris
4# Referenced:  Orange.data.io
5# Classes:     Orange.data.io.toARFF
6
7import Orange
8iris = Orange.data.Table('iris.tab')
9Orange.data.io.toARFF('iris.testsave.arff', iris)
10iris.save('iris.testsave.arff')
11f = open('iris.testsave.arff')
12for line in f:
13    print line.strip()
14f.close()
Note: See TracBrowser for help on using the repository browser.