source: orange/docs/reference/rst/code/unusedValues.py @ 9869:9b60ffca04ca

Revision 9869:9b60ffca04ca, 458 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Fixed a bug.

Line 
1import Orange
2data = Orange.data.Table("unusedValues")
3
4new_variables = [Orange.core.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.