Last active
September 7, 2020 18:21
-
-
Save bgweber/8f0252fe4f76ada812e5c3710367c15d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
df = pd.read_csv("game_skater_stats.csv") | |
df = df[df['player_id'] == 8467412] | |
print(df.head(3)) | |
for index, row in df.iterrows(): | |
event = { "playerID": int(row['player_id']), "Game_ID": int(row['game_id']), | |
"goals": int(row['goals']), "assists": int(row['assists']), | |
"shots": int(row['shots']), "hits": int(row['hits']) } | |
print(event) | |
requests.post("http://localhost:5000/update", json = event) | |
prediction = requests.get("http://localhost:5000/score?playerID=8467412") | |
print(prediction.json()) | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment