def saveRecords(self, path='<STR_LIT>'):
numRecords = self.fields[<NUM_LIT:0>].numRecords<EOL>assert (all(field.numRecords==numRecords for field in self.fields))<EOL>import csv<EOL>with open(path+'<STR_LIT>', '<STR_LIT:wb>') as f:<EOL><INDENT>writer = csv.writer(f)<EOL>writer.writerow(self.getAllFieldNames())<EOL>writer.writerow(self.getAllDataTypes())<EOL>writer.writerow(self.getAllFlags())<EOL>writer.writerows(self.getAllRecords())<EOL><DEDENT>if self.verbosity><NUM_LIT:0>:<EOL><INDENT>print('<STR_LIT>', numRecords,'<STR_LIT>',path,'<STR_LIT>')<EOL><DEDENT>
Export all the records into a csv file in numenta format.

        Example header format:
        fieldName1    fieldName2    fieldName3
        date          string        float
        T             S

        Parameters:
        --------------------------------------------------------------------
        path:      Relative path of the file to which the records are to be exported