Spaces:
Running
Running
James McCool
commited on
Commit
·
12804c6
1
Parent(s):
29020f7
Refactor app.py to remove 'index' column from dataframes, simplifying data handling and improving clarity in data processing.
Browse files
app.py
CHANGED
@@ -63,20 +63,20 @@ def init_baselines():
|
|
63 |
cursor = collection.find()
|
64 |
player_frame = pd.DataFrame(cursor)
|
65 |
|
66 |
-
roo_data = player_frame.drop(columns=['_id'
|
67 |
roo_data['Salary'] = roo_data['Salary'].astype(int)
|
68 |
|
69 |
collection = db["Player_SD_Range_Of_Outcomes"]
|
70 |
cursor = collection.find()
|
71 |
player_frame = pd.DataFrame(cursor)
|
72 |
|
73 |
-
sd_roo_data = player_frame.drop(columns=['_id'
|
74 |
sd_roo_data['Salary'] = sd_roo_data['Salary'].astype(int)
|
75 |
|
76 |
collection = db["Scoring_Percentages"]
|
77 |
cursor = collection.find()
|
78 |
team_frame = pd.DataFrame(cursor)
|
79 |
-
scoring_percentages = team_frame.drop(columns=['_id'
|
80 |
|
81 |
return roo_data, sd_roo_data, scoring_percentages
|
82 |
|
|
|
63 |
cursor = collection.find()
|
64 |
player_frame = pd.DataFrame(cursor)
|
65 |
|
66 |
+
roo_data = player_frame.drop(columns=['_id'])
|
67 |
roo_data['Salary'] = roo_data['Salary'].astype(int)
|
68 |
|
69 |
collection = db["Player_SD_Range_Of_Outcomes"]
|
70 |
cursor = collection.find()
|
71 |
player_frame = pd.DataFrame(cursor)
|
72 |
|
73 |
+
sd_roo_data = player_frame.drop(columns=['_id'])
|
74 |
sd_roo_data['Salary'] = sd_roo_data['Salary'].astype(int)
|
75 |
|
76 |
collection = db["Scoring_Percentages"]
|
77 |
cursor = collection.find()
|
78 |
team_frame = pd.DataFrame(cursor)
|
79 |
+
scoring_percentages = team_frame.drop(columns=['_id'])
|
80 |
|
81 |
return roo_data, sd_roo_data, scoring_percentages
|
82 |
|