From 8415605567a2d95f508eb21becba1c43e0d67b1f Mon Sep 17 00:00:00 2001 From: Rasmus Luha Date: Fri, 18 Mar 2022 00:47:50 +0200 Subject: delete api utils file --- api/utils.py | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 api/utils.py (limited to 'api') diff --git a/api/utils.py b/api/utils.py deleted file mode 100644 index 069f072..0000000 --- a/api/utils.py +++ /dev/null @@ -1,18 +0,0 @@ -import pandas as pd - -# Making relative paths. On windows slashes would be backwards -# It is probably not the best way. -relPathTeams = "../../AllAboutData/Data/NBAteams.csv" -relPathPlayers = "../../AllAboutData/Data/Players/" - -def getTeamNames(): - ''' - Returns dictionary with fetched teams' names as keys - and full_names as values. - ''' - - teamsDf = pd.read_csv(relPathTeams).to_dict() - team_names = {} - for el in range(len(teamsDf["name"])): - team_names.update({teamsDf["name"][el] : teamsDf["full_name"][el]}) - return team_names -- cgit v1.2.3