Spaces:
Running
Running
James McCool
commited on
Commit
·
ba104a9
1
Parent(s):
89881fc
Refactor imports and add numpy/pandas utility imports to NBA functions
Browse files- app.py +14 -1
- function_hold/NBA_functions.py +9 -0
app.py
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
st.set_page_config(layout="wide")
|
| 3 |
import numpy as np
|
| 4 |
import pandas as pd
|
| 5 |
import time
|
| 6 |
from fuzzywuzzy import process
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
from function_hold.NBA_functions import DK_NBA_ROO_Build, FD_NBA_ROO_Build
|
| 8 |
|
| 9 |
def load_file(upload):
|
|
@@ -87,4 +100,4 @@ with tab2:
|
|
| 87 |
elif site_var == "Fanduel":
|
| 88 |
disp_file = FD_MLB_ROO_Build(projections)
|
| 89 |
|
| 90 |
-
|
|
|
|
| 1 |
+
#initial imports
|
| 2 |
import streamlit as st
|
| 3 |
st.set_page_config(layout="wide")
|
| 4 |
import numpy as np
|
| 5 |
import pandas as pd
|
| 6 |
import time
|
| 7 |
from fuzzywuzzy import process
|
| 8 |
+
|
| 9 |
+
# Bring in numpy reqs
|
| 10 |
+
from numpy import nan as np_nan
|
| 11 |
+
from numpy import where as np_where
|
| 12 |
+
from numpy import random as np_random
|
| 13 |
+
from numpy import zeros as np_zeros
|
| 14 |
+
from numpy import array as np_array
|
| 15 |
+
from pandas import concat as pd_concat
|
| 16 |
+
from pandas import merge as pd_merge
|
| 17 |
+
from pandas import DataFrame
|
| 18 |
+
|
| 19 |
+
#bring in functions
|
| 20 |
from function_hold.NBA_functions import DK_NBA_ROO_Build, FD_NBA_ROO_Build
|
| 21 |
|
| 22 |
def load_file(upload):
|
|
|
|
| 100 |
elif site_var == "Fanduel":
|
| 101 |
disp_file = FD_MLB_ROO_Build(projections)
|
| 102 |
|
| 103 |
+
st.dataframe(disp_file)
|
function_hold/NBA_functions.py
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
def DK_NBA_ROO_Build(projections_file):
|
| 2 |
total_sims = 1000
|
| 3 |
|
|
|
|
| 1 |
+
from numpy import nan as np_nan
|
| 2 |
+
from numpy import where as np_where
|
| 3 |
+
from numpy import random as np_random
|
| 4 |
+
from numpy import zeros as np_zeros
|
| 5 |
+
from numpy import array as np_array
|
| 6 |
+
from pandas import concat as pd_concat
|
| 7 |
+
from pandas import merge as pd_merge
|
| 8 |
+
from pandas import DataFrame
|
| 9 |
+
|
| 10 |
def DK_NBA_ROO_Build(projections_file):
|
| 11 |
total_sims = 1000
|
| 12 |
|