(self, data_inst)
return processed_data
turn data into sparse and align header/ algin data table header
turn data into sparse and align header/ algin data table header
turn data into sparse and align header / algin data table header
def data_and_header_alignment(self, data_inst):

        """
        turn data into sparse and align header/ algin data table header
        """

        cache_dataset_key = self.predict_data_cache.get_data_key(data_inst)

        if cache_dataset_key in self.data_alignment_map:
            processed_data = self.data_alignment_map[cache_dataset_key]
        else:
            data_inst_tmp = self.data_alignment(data_inst)
            header = [None] * len(self.feature_name_fid_mapping)
            for idx, col in self.feature_name_fid_mapping.items():
                header[idx] = col
            processed_data = data_overview.header_alignment(data_inst_tmp, header)
            self.data_alignment_map[cache_dataset_key] = processed_data

        return processed_data
def data_and_header_alignment ( self , data_inst ) : cache_dataset_key = self . predict_data_cache . get_data_key ( data_inst ) if cache_dataset_key in self . data_alignment_map : processed_data = self . data_alignment_map [ cache_dataset_key ] else : data_inst_tmp = self . data_alignment ( data_inst ) header = [ None ] * len ( self . feature_name_fid_mapping ) for idx , col in self . feature_name_fid_mapping . items ( ) : header [ idx ] = col processed_data = data_overview . header_alignment ( data_inst_tmp , header ) self . data_alignment_map [ cache_dataset_key ] = processed_data return processed_data