예제 #1
0
 def _savecuts(self, event=None):
     root = Tk()
     root.withdraw()
     csvfile = asksaveasfile(mode='w',defaultextension='.csv',title='Choose a file to save cuts to')
     root.destroy()
     if csvfile:
         pd.DataFrame(self.gpacuts).to_csv(csvfile)
예제 #2
0
 def save(self):
     fp = tkinter_tkfiledialog.asksaveasfile(mode='wb',
                                             initialdir=self.dirname,
                                             **self.file_type_opt)
     if fp is None:
         return
     with fp:
         self.dirname = os.path.dirname(fp.name)
         fp.write(self.output)
예제 #3
0
    def _savegrades(self, event=None):
        sorted_students = self.student_list.sort_values(by=['Last','First'])
        print(sorted_students)
        root = Tk()
        root.withdraw()
        csvfile = asksaveasfile(mode='w',defaultextension='.csv',title='Choose a file to save grades to')
        root.destroy()
        if csvfile:

            sorted_students.to_csv(csvfile)
예제 #4
0
 def _saveimport(self, event=None):
     root = Tk()
     root.withdraw()
     csvfile = asksaveasfile(mode='w',defaultextension='.csv',title='Choose a file to save registrar import to')
     root.destroy()
     if csvfile:
         sorted_students = self.student_list.sort_values(by=['Last','First'])
         finalgrades = pd.DataFrame()
         finalgrades['Name'] = sorted_students['Last'] + ', ' + sorted_students['First']
         finalgrades['EID'] = sorted_students.index
         finalgrades['Grade'] = sorted_students['Grades']
         finalgrades['Absences'] = ''
         finalgrades['Remarks'] = ''
         finalgrades['Unique'] = sorted_students['Class']
         finalgrades.to_csv(csvfile, sep='\t', index=False, encoding='utf-8')