Ejemplo n.º 1
0
 def test_reg(self):
     sr = salaries_regression()
     regdata = sr.df.columns
     self.assertIn('SALARY',regdata) #check if salaries data is in the data frame
     self.assertIn('PPG',regdata) #check if stats data, points per game, is in the data frame
     sr.df = sr.salaries_stats_regression()
     regresults = sr.df.columns
     self.assertIn('Predicted',regresults) #check if predicted salaries data is in the regression result dataframe
     self.assertIn('Difference',regresults) #check if salaries' difference ratio data is in the regression result dataframe
Ejemplo n.º 2
0
 def test_reg(self):
     sr = salaries_regression()
     regdata = sr.df.columns
     self.assertIn('SALARY',
                   regdata)  #check if salaries data is in the data frame
     self.assertIn(
         'PPG', regdata
     )  #check if stats data, points per game, is in the data frame
     sr.df = sr.salaries_stats_regression()
     regresults = sr.df.columns
     self.assertIn(
         'Predicted', regresults
     )  #check if predicted salaries data is in the regression result dataframe
     self.assertIn(
         'Difference', regresults
     )  #check if salaries' difference ratio data is in the regression result dataframe
Ejemplo n.º 3
0
 def get(self, year):
     sr = regression.salaries_regression(int(year))
     self.write(
         rendering.render_regression(sr, TEMPLATE_DIR,
                                     'salaries_regression.html'))
Ejemplo n.º 4
0
 def get(self,year):
     sr = regression.salaries_regression(int(year))
     self.write(rendering.render_regression(sr, TEMPLATE_DIR, 'salaries_regression.html'))