Changeset 9789:ce24aa63eaac in orange


Ignore:
Timestamp:
02/06/12 18:19:46 (2 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
rebase_source:
5d744c570622bd254665e361530b5fc039a25268
Message:

Half-polished Orange.data.table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/Orange.data.table.rst

    r9726 r9789  
    2424:obj:`Table` supports most list-like operations: getting, setting, 
    2525removing data instances, as well as methods :obj:`append` and 
    26 :obj:`extend`. The limitation is that table contain instances of 
    27 :obj:`Orange.data.Instance`. When setting items, the item must be 
     26:obj:`extend`. When setting items, the item must be 
    2827either the instance of the correct type or a Python list of 
    2928appropriate length and content to be converted into a data instance of 
    30 the corresponding domain. 
    31  
    32 When retrieving data instances, what we get are references and not 
    33 copies. Changing the retrieved instance changes the data in the table, 
    34 too. 
    35  
    36 Slicing returns ordinary Python lists containing the data instance, 
    37 not a new Table. 
    38  
    39 As usual in Python, the data table is considered False, when empty. 
     29the corresponding domain. Retrieving data instances returns references 
     30and not copies: changing the retrieved instance changes the data in the 
     31table. Slicing returns ordinary Python lists containing references to 
     32data instances, not a new :obj:`Orange.data.Table`. 
     33 
     34According to a Python convention, the data table is considered ``False`` 
     35when empty. 
    4036 
    4137.. class:: Table 
     
    4844    .. attribute:: owns_instances 
    4945 
    50         True, if the table contains the data instances, False if it 
    51         contains just references to instances owned by another table. 
     46        ``True``, if the table contains the data instances and ``False`` if 
     47        it contains references to instances owned by another table. 
    5248 
    5349    .. attribute:: owner 
    5450 
    55         If the table does not own the data instances, this attribute 
    56         gives the actual owner. 
     51        The actual owner of the data when ``own_instances`` is ``False``. 
    5752 
    5853    .. attribute:: version 
    5954 
    60         An integer that is increased whenever the table is 
    61         changed. This is not foolproof, since the object cannot 
    62         detect when individual instances are changed. It will, however, 
    63         catch any additions and removals from the table. 
     55        An integer that is increased when instances are added or 
     56        removed from the table. It does not detect changes of the data. 
    6457 
    6558    .. attribute:: random_generator 
     
    6760       Random generator that is used by method 
    6861       :obj:`random_instance`. If the method is called and 
    69        random_generator is None, a new generator is constructed with 
    70        random seed 0, and stored here for subsequent use. 
     62       ``random_generator`` is ``None``, a new generator is constructed 
     63       with random seed 0 and stored here for future use. 
    7164 
    7265    .. attribute:: attribute_load_status 
     
    7467       If the table was loaded from a file, this list of flags tells 
    7568       whether the feature descriptors were reused and how they 
    76        matched. See :ref:`descriptor reuse <variable_descriptor_reuse>` for details. 
     69       matched. See :ref:`descriptor reuse <variable_descriptor_reuse>` 
     70       for details. 
    7771 
    7872    .. attribute:: meta_attribute_load_status 
    7973 
    80        Same as above, except that this is a dictionary for meta 
    81        attributes, with keys corresponding to their ids. 
     74       A dictionary holding this same information for meta 
     75       attributes, with keys corresponding to their ids and values to 
     76       load statuses. 
    8277 
    8378    .. method:: __init__(filename[, create_new_on]) 
     
    9085        specified in the environment variable `ORANGE_DATA_PATH`. 
    9186 
    92         The optional flag `create_new_on` decides when variable 
     87        The optional flag ``create_new_on`` decides when variable 
    9388        descriptors are reused. See :ref:`descriptor reuse 
    9489        <variable_descriptor_reuse>` for more details. 
Note: See TracChangeset for help on using the changeset viewer.