From f8c06a239e1bd566e998f70b470e9c14b0a473b7 Mon Sep 17 00:00:00 2001 From: Eljakim Herrewijnen Date: Wed, 15 Sep 2021 23:05:34 +0200 Subject: [PATCH] Loading array now works --- flaskapp.py | 2 -- main.py | 1 + plots.py | 12 ++++++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/flaskapp.py b/flaskapp.py index d53a873..e397469 100644 --- a/flaskapp.py +++ b/flaskapp.py @@ -5,8 +5,6 @@ app = Flask("Project Numeri") def index(): return render_template('index.html') - - def RunWeb(): app.run(debug=True) diff --git a/main.py b/main.py index 5d5e684..fc2a2f4 100644 --- a/main.py +++ b/main.py @@ -3,4 +3,5 @@ from plots import Cijferlijst if __name__ == "__main__": cf = Cijferlijst() + cf.CalculateMedian() RunWeb() \ No newline at end of file diff --git a/plots.py b/plots.py index 87fa85b..06c47c3 100644 --- a/plots.py +++ b/plots.py @@ -1,10 +1,18 @@ import pandas as pd import numpy as np -GRADE_LIST = pd.read_csv("Cijfers-HerrewijnenJonathan.csv", skiprows=3) + +GRADE_LIST = "Cijfers-HerrewijnenJonathan.csv" class Cijferlijst: def __init__(self, grade_list=GRADE_LIST): self.grade_list = grade_list + self.ps = pd.read_csv(GRADE_LIST, skiprows=2, sep=';') def iets(self): - print(self.grade_list) \ No newline at end of file + print(self.grade_list) + + def CalculateMedian(self, subject, year): + # Calculates average for all scores without weight! + Grades = self.ps['Cijfer(Voortgangsdossier)'].loc[:] + print("blub") +