示例#1
0
def which_scores(df):
	import pandas as pd
	import numpy as np
	import FF_scoring 
	import easygui as eg

	scores = df.columns.values
	players = pd.unique(df.Name.ravel()) #getting a list of teams for the week 
	question = "Select scores to include"
	title = "Select scores"
	listOfOptions = scores
	choice = eg.multchoicebox(question , title, listOfOptions)
	print choice
	cont = raw_input("Include these scores (if none are showing, there are none selected)? (y/n)")
	cont = str(cont)
	if cont == 'y':
		score_list = list(choice) #removing the teams
	else:
		df = FF_scoring.which_scores(df)
	return score_list
示例#2
0
	salary = 60000-kick_sal
	data_set = "weeks/week-" +week + "/aggregate-week" +week +'fd.csv'
	excel_out = "weeks/week-" +week + "/lineups-week" + week + spec +'fd.xlsx'
else:
	data_set = "weeks/week-" +week + "/aggregate-week" +week +'dk.csv'  
	excel_out = "weeks/week-" +week + "/lineups-week" + week + spec + 'dk.xlsx'
	
#getting the data
df = pd.read_csv(data_set)
df = FF_scoring.exclude_teams(df)
df = FF_scoring.exclude_players(df)

#need a list here

#score_list = ['average'] 
score_list = FF_scoring.which_scores(df)

#print score_list


#---------
#cont = raw_input("Continue (y/n)?") # for ESPN, this is for the csv_output (auto-refreshes projections)
#cont = str(cont)
#if cont == 'n':
#	sys.exit(0)
#---------

start_time = datetime.now()
writer = pd.ExcelWriter(excel_out)

s_n = len(score_list)