Ignore:
Timestamp:
02/07/12 09:11:19 (2 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Children:
9884:52decd2d77eb, 9885:b2b4d2f190ab
Message:

Polished documentation on data.Table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/code/datatable1.py

    r9372 r9883  
    77import Orange 
    88 
    9 card = [3, 3, 2, 3, 4, 2] 
     9cards = [3, 3, 2, 3, 4, 2] 
    1010values = ["1", "2", "3", "4"] 
    1111 
    12 features = [Orange.data.variable.Discrete(chr(97+i), values = values[:card[i]]) 
    13               for i in range(6)] 
     12features = [Orange.data.variable.Discrete(name, values = values[:card]) 
     13              for name, card in zip("abcdef", cards)] 
    1414classattr = Orange.data.variable.Discrete("y", values = ["0", "1"]) 
    1515domain = Orange.data.Domain(features + [classattr]) 
Note: See TracChangeset for help on using the changeset viewer.