James McCool
commited on
Commit
·
0839608
1
Parent(s):
5b70f05
Adding sport specific salary grabs
Browse files
app.py
CHANGED
|
@@ -128,6 +128,30 @@ def grab_nfl_reg_salaries():
|
|
| 128 |
records = records.rename(columns={'Display Name': 'Name', 'draftableId': 'ID', 'Position': 'Roster Position'})
|
| 129 |
return records
|
| 130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
def define_dk_nfl_showdown_slates():
|
| 132 |
collection = nfl_db["DK_SD_NFL_ROO"]
|
| 133 |
cursor = collection.find()
|
|
|
|
| 128 |
records = records.rename(columns={'Display Name': 'Name', 'draftableId': 'ID', 'Position': 'Roster Position'})
|
| 129 |
return records
|
| 130 |
|
| 131 |
+
def grab_nba_reg_salaries():
|
| 132 |
+
collection = salaries_db["NBA_reg_player_info"]
|
| 133 |
+
today_str = datetime.now().strftime("%Y%m%d")
|
| 134 |
+
records = pd.DataFrame(list(collection.find({'Contest Date': {'$gte': today_str}})))
|
| 135 |
+
records = records[['Display Name', 'draftableId', 'Position', 'Salary']]
|
| 136 |
+
records = records.rename(columns={'Display Name': 'Name', 'draftableId': 'ID', 'Position': 'Roster Position'})
|
| 137 |
+
return records
|
| 138 |
+
|
| 139 |
+
def grab_mlb_reg_salaries():
|
| 140 |
+
collection = salaries_db["MLB_reg_player_info"]
|
| 141 |
+
today_str = datetime.now().strftime("%Y%m%d")
|
| 142 |
+
records = pd.DataFrame(list(collection.find({'Contest Date': {'$gte': today_str}})))
|
| 143 |
+
records = records[['Display Name', 'draftableId', 'Position', 'Salary']]
|
| 144 |
+
records = records.rename(columns={'Display Name': 'Name', 'draftableId': 'ID', 'Position': 'Roster Position'})
|
| 145 |
+
return records
|
| 146 |
+
|
| 147 |
+
def grab_nhl_reg_salaries():
|
| 148 |
+
collection = salaries_db["NHL_reg_player_info"]
|
| 149 |
+
today_str = datetime.now().strftime("%Y%m%d")
|
| 150 |
+
records = pd.DataFrame(list(collection.find({'Contest Date': {'$gte': today_str}})))
|
| 151 |
+
records = records[['Display Name', 'draftableId', 'Position', 'Salary']]
|
| 152 |
+
records = records.rename(columns={'Display Name': 'Name', 'draftableId': 'ID', 'Position': 'Roster Position'})
|
| 153 |
+
return records
|
| 154 |
+
|
| 155 |
def define_dk_nfl_showdown_slates():
|
| 156 |
collection = nfl_db["DK_SD_NFL_ROO"]
|
| 157 |
cursor = collection.find()
|