(self, select_col_names, party_id=None)
return list(values)
Return values selected by provided col_names.
        Use party_id to indicate which party to get. If None, obtain from values,
        otherwise, obtain from host_values
Return values selected by provided col_names.
        Use party_id to indicate which party to get. If None, obtain from values,
        otherwise, obtain from host_values
Return values selected by provided col_names . Use party_id to indicate which party to get . If None obtain from values otherwise obtain from host_values
def get_partial_values(self, select_col_names, party_id=None):
        """
        Return values selected by provided col_names.
        Use party_id to indicate which party to get. If None, obtain from values,
        otherwise, obtain from host_values
        """
        if party_id is None:
            col_name_map = {name: idx for idx, name in enumerate(self.col_names)}
            col_indices = [col_name_map[x] for x in select_col_names]
            values = np.array(self.values)[col_indices]
        else:
            if party_id not in self.host_party_ids:
                raise ValueError(f"party_id: {party_id} is not in host_party_ids:"
                                 f" {self.host_party_ids}")
            party_idx = self.host_party_ids.index(party_id)
            col_name_map = {name: idx for idx, name in
                            enumerate(self.host_col_names[party_idx])}
            LOGGER.debug(f"col_name_map: {col_name_map}")

            values = []
            host_values = np.array(self.host_values[party_idx])
            for host_col_name in select_col_names:
                if host_col_name in col_name_map:
                    values.append(host_values[col_name_map[host_col_name]])
                else:
                    values.append(0)

            # col_indices = [col_name_map[x] for x in select_col_names]
            # values = np.array(self.host_values[party_idx])[col_indices]
        return list(values)
def get_partial_values ( self , select_col_names , party_id = None ) : if party_id is None : col_name_map = { name : idx for idx , name in enumerate ( self . col_names ) } col_indices = [ col_name_map [ x ] for x in select_col_names ] values = np . array ( self . values ) [ col_indices ] else : if party_id not in self . host_party_ids : raise ValueError ( f"party_id: {party_id} is not in host_party_ids:" f" {self.host_party_ids}" ) party_idx = self . host_party_ids . index ( party_id ) col_name_map = { name : idx for idx , name in enumerate ( self . host_col_names [ party_idx ] ) } LOGGER . debug ( f"col_name_map: {col_name_map}" ) values = [ ] host_values = np . array ( self . host_values [ party_idx ] ) for host_col_name in select_col_names : if host_col_name in col_name_map : values . append ( host_values [ col_name_map [ host_col_name ] ] ) else : values . append ( 0 ) # col_indices = [col_name_map[x] for x in select_col_names] # values = np.array(self.host_values[party_idx])[col_indices] return list ( values )