merge_machine/abstract_data_project.py
def transform(self, module_name, params):
        '''
        Run module on pandas DataFrame in memory and update memory state.
        /!\ DATA IS CLEANED WHEN transform IS CALLED
        '''
        self._check_mem_data()
        self.clean_after(module_name, self.mem_data_info['file_name'])
        
        # Initiate log
        log = self._init_active_log(module_name, 'transform')

        # Initiate run_info
        run_info = dict()
        run_info['file_name'] = self.mem_data_info['file_name']
        run_info['module_name'] = module_name
        run_info['params'] = params
        run_info['mod_count'] = defaultdict(int)
        self.run_info_buffer[(module_name, run_info['file_name'])] = run_info

        # TODO: catch module errors and add to log
        # Run module on pandas DataFrame 
        logging.info('Running transform: {0}'.format(module_name))
        self.mem_data = (self.run_transform_module(module_name, data, params) \
                                                 for data in self.mem_data)
        self.mem_data_info['module_name'] = module_name
        self.mem_data_info['data_was_transformed'] = True

        # Complete log
        log = self._end_active_log(log, error=False)
        
        return log, run_info

        Run module on pandas DataFrame in memory and update memory state.
        /!\ DATA IS CLEANED WHEN transform IS CALLED
        
Run module on pandas DataFrame in memory and update memory state.
\ DATA IS CLEANED WHEN transform IS CALLED
Run module on pandas DataFrame in memory and update memory state . \ DATA IS CLEANED WHEN transform IS CALLED
def transform(self, module_name, params):
        self._check_mem_data()
        self.clean_after(module_name, self.mem_data_info['file_name'])
        log = self._init_active_log(module_name, 'transform')
        run_info = dict()
        run_info['file_name'] = self.mem_data_info['file_name']
        run_info['module_name'] = module_name
        run_info['params'] = params
        run_info['mod_count'] = defaultdict(int)
        self.run_info_buffer[(module_name, run_info['file_name'])] = run_info
        logging.info('Running transform: {0}'.format(module_name))
        self.mem_data = (self.run_transform_module(module_name, data, params) \
                                                 for data in self.mem_data)
        self.mem_data_info['module_name'] = module_name
        self.mem_data_info['data_was_transformed'] = True
        log = self._end_active_log(log, error=False)
        return log, run_info
def transform ( self , module_name , params ) : self . _check_mem_data ( ) self . clean_after ( module_name , self . mem_data_info [ 'file_name' ] ) log = self . _init_active_log ( module_name , 'transform' ) run_info = dict ( ) run_info [ 'file_name' ] = self . mem_data_info [ 'file_name' ] run_info [ 'module_name' ] = module_name run_info [ 'params' ] = params run_info [ 'mod_count' ] = defaultdict ( int ) self . run_info_buffer [ ( module_name , run_info [ 'file_name' ] ) ] = run_info logging . info ( 'Running transform: {0}' . format ( module_name ) ) self . mem_data = ( self . run_transform_module ( module_name , data , params ) for data in self . mem_data ) self . mem_data_info [ 'module_name' ] = module_name self . mem_data_info [ 'data_was_transformed' ] = True log = self . _end_active_log ( log , error = False ) return log , run_info
Run module on pandas DataFrame in memory and update memory state.
Run module on pandas DataFrame in memory and update memory state .
'''
        Run module on pandas DataFrame in memory and update memory state.
        /!\ DATA IS CLEANED WHEN transform IS CALLED
        ''' # Initiate log # Initiate run_info # TODO: catch module errors and add to log # Run module on pandas DataFrame  # Complete log
self
module_name
params