(self, var_dict, ids=None, selection=False)
return table
keys : ['attributes', 'metas', 'class_vars']
        vals: new_atrs - dictionary where key is old name, val
            is [is_different:bool, table_keys:list])
        ids: dict with ids for each table
keys : ['attributes', 'metas', 'class_vars']
        vals: new_atrs - dictionary where key is old name, val
            is [is_different:bool, table_keys:list])
        ids: dict with ids for each table
keys : [ attributes metas class_vars ] vals : new_atrs - dictionary where key is old name val is [ is_different : bool table_keys : list ] ) ids : dict with ids for each table
def extract_rowwise(self, var_dict, ids=None, selection=False):
        """
        keys : ['attributes', 'metas', 'class_vars']
        vals: new_atrs - dictionary where key is old name, val
            is [is_different:bool, table_keys:list])
        ids: dict with ids for each table
        """
        all_ids = sorted(reduce(set.union, [set(val) for val in ids.values()], set()))

        permutations = {}
        for table_key, dict_ in ids.items():
            permutations[table_key] = get_perm(list(dict_), all_ids)

        domain = {type_ : [] for type_ in self.atr_types}
        values = defaultdict(list)
        renamed = []
        for atr_type, vars_dict in var_dict.items():
            for var_name, var_data in vars_dict.items():
                different = var_data[0]
                if different:
                    # Columns are different, copy and rename them.
                    # Renaming is done here to mark appropriately the source table.
                    # Additional strange clashes are checked later in merge_data
                    for var, table_key in var_data[1]:
                        temp = self.data[table_key].table
                        idx = list(self.data).index(table_key) + 1
                        domain[atr_type].append(var.copy(name='{} ({})'.format(var_name, idx)))
                        renamed.append(var_name.name)
                        v = getattr(temp[list(ids[table_key].values()), var_name],
                                    self.atr_vals[atr_type])
                        perm = permutations[table_key]
                        if len(v) < len(all_ids):
                            values[atr_type].append(pad_columns(v, perm, len(all_ids)))
                        else:
                            values[atr_type].append(v[perm].reshape(-1, 1))
                else:
                    value = np.full((len(all_ids), 1), np.nan)
                    domain[atr_type].append(var_data[1][0][0].copy())
                    for _, table_key in var_data[1]:
                        #different tables have different part of the same attribute vector
                        perm = permutations[table_key]
                        v = getattr(self.data[table_key].table[list(ids[table_key].values()),
                                                               var_name],
                                    self.atr_vals[atr_type]).reshape(-1, 1)
                        value = value.astype(v.dtype, copy=False)
                        value[perm] = v
                    values[atr_type].append(value)

        if renamed:
            self.Warning.renamed_vars(', '.join(renamed))
        ids = None if self._uses_feature() else np.array(all_ids)
        table = self.merge_data(domain, values, ids)
        if selection:
            mask = [idx in self.selected_items for idx in all_ids]
            return create_annotated_table(table, mask)
        return table
def extract_rowwise ( self , var_dict , ids = None , selection = False ) : all_ids = sorted ( reduce ( set . union , [ set ( val ) for val in ids . values ( ) ] , set ( ) ) ) permutations = { } for table_key , dict_ in ids . items ( ) : permutations [ table_key ] = get_perm ( list ( dict_ ) , all_ids ) domain = { type_ : [ ] for type_ in self . atr_types } values = defaultdict ( list ) renamed = [ ] for atr_type , vars_dict in var_dict . items ( ) : for var_name , var_data in vars_dict . items ( ) : different = var_data [ 0 ] if different : # Columns are different, copy and rename them. # Renaming is done here to mark appropriately the source table. # Additional strange clashes are checked later in merge_data for var , table_key in var_data [ 1 ] : temp = self . data [ table_key ] . table idx = list ( self . data ) . index ( table_key ) + 1 domain [ atr_type ] . append ( var . copy ( name = '{} ({})' . format ( var_name , idx ) ) ) renamed . append ( var_name . name ) v = getattr ( temp [ list ( ids [ table_key ] . values ( ) ) , var_name ] , self . atr_vals [ atr_type ] ) perm = permutations [ table_key ] if len ( v ) < len ( all_ids ) : values [ atr_type ] . append ( pad_columns ( v , perm , len ( all_ids ) ) ) else : values [ atr_type ] . append ( v [ perm ] . reshape ( - 1 , 1 ) ) else : value = np . full ( ( len ( all_ids ) , 1 ) , np . nan ) domain [ atr_type ] . append ( var_data [ 1 ] [ 0 ] [ 0 ] . copy ( ) ) for _ , table_key in var_data [ 1 ] : #different tables have different part of the same attribute vector perm = permutations [ table_key ] v = getattr ( self . data [ table_key ] . table [ list ( ids [ table_key ] . values ( ) ) , var_name ] , self . atr_vals [ atr_type ] ) . reshape ( - 1 , 1 ) value = value . astype ( v . dtype , copy = False ) value [ perm ] = v values [ atr_type ] . append ( value ) if renamed : self . Warning . renamed_vars ( ', ' . join ( renamed ) ) ids = None if self . _uses_feature ( ) else np . array ( all_ids ) table = self . merge_data ( domain , values , ids ) if selection : mask = [ idx in self . selected_items for idx in all_ids ] return create_annotated_table ( table , mask ) return table