def load_cutoff_times(self, filename=""): if "leaderboard" in self.mode: print "\tLoading cutoff times from {}...".format("days.csv"), self.cutoff_time_list = pd.read_csv("../Data/" + self.data_set_name + "/" "days.csv", index_col='folder_name', parse_dates=[1]) print "done" elif filename != "": print "\tLoading cutoff times from {}...".format(filename), self.cutoff_time_list = pd.read_csv("input_csv/" + filename, index_col='folder_name', parse_dates=[1]) print "done" else: print "\tCreating new cutoff times...", self.cutoff_time_list = tdu.generate_cutoff_times() print "done" self.cutoff_time = self.cutoff_time_list['selected_cutoff_time'].ix[self.folder_name] self.midnight_time = datetime(self.cutoff_time.year, self.cutoff_time.month, self.cutoff_time.day, tzinfo=tzutc())
def load_cutoff_times(self, filename=""): if "leaderboard" in self.mode: print "\tLoading cutoff times from {}...".format("days.csv"), self.cutoff_time_list = pd.read_csv("../Data/" + self.data_set_name + "/" "days.csv", index_col='folder_name', parse_dates=[1]) print "done" elif filename != "": print "\tLoading cutoff times from {}...".format(filename), self.cutoff_time_list = pd.read_csv("input_csv/" + filename, index_col='folder_name', parse_dates=[1]) print "done" else: print "\tCreating new cutoff times...", self.cutoff_time_list = tdu.generate_cutoff_times() print "done" self.cutoff_time = self.cutoff_time_list['selected_cutoff_time'].ix[ self.folder_name] self.midnight_time = datetime(self.cutoff_time.year, self.cutoff_time.month, self.cutoff_time.day, tzinfo=tzutc())
def generate_new_cutoff_times(self): if "leaderboard" in self.mode: print "You don't need to do this." else: self.cutoff_time_list = tdu.generate_cutoff_times() # Fix folder names, currently static. They need to change? self.cutoff_time = self.cutoff_time_list['selected_cutoff_time'].ix[self.folder_name] self.midnight_time = datetime(self.cutoff_time.year, self.cutoff_time.month, self.cutoff_time.day, tzinfo=tzutc())
def generate_new_cutoff_times(self): if "leaderboard" in self.mode: print "You don't need to do this." else: self.cutoff_time_list = tdu.generate_cutoff_times() # Fix folder names, currently static. They need to change? self.cutoff_time = self.cutoff_time_list[ 'selected_cutoff_time'].ix[self.folder_name] self.midnight_time = datetime(self.cutoff_time.year, self.cutoff_time.month, self.cutoff_time.day, tzinfo=tzutc())