pegasusio/unimodal_data.py
def scan_black_list(self, black_list: Set[str]):
        """ Remove (key, value) pairs where key is in black_list
        """
        def _scan_dataframe(df: pd.DataFrame, black_list: Set[str]):
            cols = []
            for key in df.columns:
                if key in black_list:
                    cols.append(key)
            if len(cols) > 0:
                df.drop(columns = cols, inplace = True)

        def _scan_dict(mapping: dict, black_list: Set[str]):
            for key in list(mapping):
                if key in black_list:
                    del mapping[key]

        _scan_dataframe(self.barcode_metadata, black_list)
        _scan_dataframe(self.feature_metadata, black_list)

        _scan_dict(self.matrices, black_list)
        _scan_dict(self.barcode_multiarrays, black_list)
        _scan_dict(self.feature_multiarrays, black_list)
        _scan_dict(self.barcode_multigraphs, black_list)
        _scan_dict(self.feature_multigraphs, black_list)
        _scan_dict(self.metadata, black_list)
 Remove (key, value) pairs where key is in black_list
        
Remove (key, value) pairs where key is in black_list
Remove ( key value ) pairs where key is in black_list
def scan_black_list(self, black_list: Set[str]):
        def _scan_dataframe(df: pd.DataFrame, black_list: Set[str]):
            cols = []
            for key in df.columns:
                if key in black_list:
                    cols.append(key)
            if len(cols) > 0:
                df.drop(columns = cols, inplace = True)
        def _scan_dict(mapping: dict, black_list: Set[str]):
            for key in list(mapping):
                if key in black_list:
                    del mapping[key]
        _scan_dataframe(self.barcode_metadata, black_list)
        _scan_dataframe(self.feature_metadata, black_list)
        _scan_dict(self.matrices, black_list)
        _scan_dict(self.barcode_multiarrays, black_list)
        _scan_dict(self.feature_multiarrays, black_list)
        _scan_dict(self.barcode_multigraphs, black_list)
        _scan_dict(self.feature_multigraphs, black_list)
        _scan_dict(self.metadata, black_list)
def scan_black_list ( self , black_list : Set [ str ] ) : def _scan_dataframe ( df : pd . DataFrame , black_list : Set [ str ] ) : cols = [ ] for key in df . columns : if key in black_list : cols . append ( key ) if len ( cols ) > 0 : df . drop ( columns = cols , inplace = True ) def _scan_dict ( mapping : dict , black_list : Set [ str ] ) : for key in list ( mapping ) : if key in black_list : del mapping [ key ] _scan_dataframe ( self . barcode_metadata , black_list ) _scan_dataframe ( self . feature_metadata , black_list ) _scan_dict ( self . matrices , black_list ) _scan_dict ( self . barcode_multiarrays , black_list ) _scan_dict ( self . feature_multiarrays , black_list ) _scan_dict ( self . barcode_multigraphs , black_list ) _scan_dict ( self . feature_multigraphs , black_list ) _scan_dict ( self . metadata , black_list )
Remove (key, value) pairs where key is in black_list
Remove ( key value ) pairs where key is in black_list
""" Remove (key, value) pairs where key is in black_list
        """
self
black_list
Set[str]