def setUpClass(self): #TODO relative path to something better? self.df = data_helper.import_data("data/" + _TEST_DATA_FILE) self.odf = data_helper.import_operative_data("data/" + _OPERATIVE_TEST_DATA_FILE) self.apps = analysis.summarize_applications(self.df, self.odf) # print apps once for debugging print "Application summary based on test data:" print self.apps
def create_prediction_summary(outputFileName): logger = logging.getLogger(__name__) # exported to global scope for debugging purposes global predictionSummary predictionSummary = analysis.summarize_applications(df) logger.info("N of applications = {}".format(len(predictionSummary))) print(predictionSummary) if outputFileName is not None: predictionSummary.to_csv(outputFileName, sep=';', encoding='utf-8') else: print predictionSummary