It is initialized by passing the parent object and an index to the constructor. The index determines indices of elements within the parent object that should be seen. Any call of get_attribute() on the subset returns values corresponding to the index. A subset can be also created using the Dataset method create_subset_window_by_ids(ids) called on the parent object.
Note that only methods for viewing attributes (such as get_attribute() or summary()) make sense for using with a subset. Other methods that would for example modify attributes (such as compute_variables()) could destroy the parent dataset.