New Code Cell #1

This is what I wrote for the first cell. So far I have been able to make a chart of the students and their survey answers appear.

class Survey:

    def __init__(self, Fsurvey, name, year, limit, end):
        self.Size = Fsurvey.shape
        self.Name = name
        self.Year = year
        self.Students = Fsurvey.loc[:,['Timestamp','First Name', 'Last Name','Name of School','Grade in school','Gender (boy or girl)']]
        self.Questions = Fsurvey.columns[0:end]
     

    def list_Students(self):
        return self.Students

    def list_Questions(self):
        return self.Questions

# If there are two equal key index data['Last Name', 'First Name'], delete one
def clean_Dupli_NaN(vector):
     vector = vector.drop_duplicates(['Last Name','First Name'])
     vector = vector.dropna(axis=['columns',0], how='all')
     return vector

Comments

Popular posts from this blog

6/14/17 Notes

6/06/17 Notes (formatting code and searching for a specific person)

May 22, 2017 -- SienaSemanticsSurvey -- Code Breakdown -- Cell #8