def exclude_teams(df): import pandas as pd import numpy as np import FF_scoring import easygui as eg teams = pd.unique(df.teamAbbrev.ravel()) #getting a list of teams for the week question = "Select teams to exclude" title = "Select teams" listOfOptions = teams choice = eg.multchoicebox(question , title, listOfOptions) print choice cont = raw_input("Exclude these teams (if none are showing, there are none selected)? (y/n)") cont = str(cont) if cont == 'y': df = df[~df.teamAbbrev.isin(choice)] #removing the teams else: df = FF_scoring.exclude_teams(df) return df
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)