diff options
author | Rasmus Luha <rasmus.luha@gmail.com> | 2022-03-17 13:48:15 +0200 |
---|---|---|
committer | Rasmus Luha <rasmus.luha@gmail.com> | 2022-03-17 13:48:15 +0200 |
commit | 98e375682a50f3cdeddc8e6af022d1e8d12f608d (patch) | |
tree | 22e68ab1daea17566c2a8b0d95e48d238c691c10 /API/utils.py | |
parent | ab2efcde6a5fac062ace86aa1705dc47ce69f438 (diff) |
file name fixes
Diffstat (limited to 'API/utils.py')
-rw-r--r-- | API/utils.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/API/utils.py b/API/utils.py deleted file mode 100644 index c04bdf1..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 |