source: orange/docs/reference/rst/code/unusedValues.py @ 10547:65e8cf0457ff

Revision 10547:65e8cf0457ff, 473 bytes checked in by anzeh <anze.staric@…>, 2 years ago (diff)

Updated imports with regard to the new hierarchy.

Line 
1import Orange
2data = Orange.data.Table("unusedValues.tab")
3
4new_variables = [Orange.data.preprocess.RemoveUnusedValues(var, data) for var in data.domain.variables]
5
6print
7for variable in range(len(data.domain)):
8    print data.domain[variable],
9    if new_variables[variable] == data.domain[variable]:
10        print "retained as is"
11    elif new_variables[variable]:
12        print "reduced, new values are", new_variables[variable].values
13    else:
14        print "removed"
Note: See TracBrowser for help on using the repository browser.