Пример #1
0
def exclude_players(df):
	import pandas as pd
	import numpy as np
	import FF_scoring 
	import easygui as eg

	players = pd.unique(df.Name.ravel()) #getting a list of teams for the week 
	question = "Select players to exclude"
	title = "Select players"
	listOfOptions = players
	choice = eg.multchoicebox(question , title, listOfOptions)
	print choice
	cont = raw_input("Exclude these players (if none are showing, there are none selected)? (y/n)")
	cont = str(cont)
	if cont == 'y':
		df = df[~df.Name.isin(choice)] #removing the teams
	else:
		df = FF_scoring.exclude_players(df)
	return df
Пример #2
0
if fd =='1':
	#kick_sal = 5000
	kick_sal = raw_input("Enter kicker salary:   ")
	kick_sal = int(kick_sal)
	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)
#---------