# simR may need to be deleted
#need to convert this into a function
simR = pd.DataFrame()
# l is a dataFrame that will hold the total points scored by each lineup
l = pd.DataFrame()
## a - m stores diffrent features of the simulation results
a = []
b = []
c = []
d = []
e = []
f = []
g = []
h = []
k = []
m = []
token = True #GPP or cash
for i in range(len(sim)):
if token == True:
p = sim.iloc[i,:][sim.iloc[i,:]<= round(num_l*0.01)] #top 1% 12
q = sim.iloc[i,:][sim.iloc[i,:]<=round(num_l*0.1)] #top 10% 117
r = sim.iloc[i,:][sim.iloc[i,:]>round(num_l*0.1)] #remaining 117
l = val.iloc[i,:]
a.append(i+1)
b.append(p.count())
e.append((p.count()/num_sim)*100)
c.append(q.count())
f.append((q.count()/num_sim)*100)
d.append(r.count())
h.append((r.count()/num_sim)*100)
g.append((p.count()*4)+(q.count()*.1)-(r.count()*5))
k.append(l.mean())
m.append(l.std())
else:
p = [sim.iloc[i,:][sim.iloc[i,:]<=600]] #top 50%
r = [sim.iloc[i,:][sim.iloc[i,:]>600]] #bottom 50%
l = val.iloc[i,:]
a.append(i+1)
b.append(p.count())
e.append((p.count()/num_sim)*100)
d.append(r.count())
h.append((r.count()/num_sim)*100)
g.append((p.count()*5)-(r.count()*5))
k.append(l.mean())
m.append(l.std())
if i == 1:
print('Cleaning Data')
elif i==round(num_l*.1):
print('Data is 10% clean')
elif i==round(num_l*.25):
print('Data is 25% clean')
elif i== round(num_l*.5):
print('Data is 50% clean')
elif i== round(num_l*.75):
print('Data is 75% clean')
elif i== (num_l-1):
print('Data is 100% clean')
I can't figure out why this code will not run. No error message pops up but it should be cleaning data from the monte carlo simulation I have running. When I run the kernel, the final product is blank and it should be returning optimal lineups for NBA DFS. After the post processing, it should format the results of the monte carlo simulation. I'm not getting an error message at all but the lineups that are printing to csv are blank. I can gladly post the entire code or email it if that would help.