def setUpClass(self): self.df = data_helper.import_data("data/" + _TEST_DATA_FILE) self.users = user_analysis.summarize_users(self.df) # print apps once for debugging print "Summary of users based on test data:" print self.users
def create_user_summary(outputFileName): logger = logging.getLogger(__name__) # exported to global scope for debugging purposes global usersSummary usersSummary = user_analysis.summarize_users(df) logger.info("N of users = {}".format(len(usersSummary))) print(usersSummary) if outputFileName is not None: usersSummary.to_csv(outputFileName, sep=';', encoding='utf-8') else: print usersSummary