def to_csv(self, path='', filename_base=None):

        if filename_base is None:
            filename_base = '{0.subject_id}-{1}-{0.trial_num:03}-{0.stimulus}'.format(self, 'a' if self.alcoholic else 'c')
        filename_base = os.path.join(path, filename_base)
        temp = self.data.rename(columns=self.channels).sort(axis=1).sort_index()
        temp.to_csv(filename_base + '.data', header=False, index=False)
        self.channels.to_csv(filename_base + '.channels')
        f = open(filename_base + '.info', 'w')
        f.write('subject_id,{0.subject_id}\nalcoholic,{0.alcoholic}\ntrial_num,{0.trial_num}\nstimulus,{0.stimulus}'.format(self))
        f.close()
Store EegTrial to disk as three CSVs: data, channel dictionary, info.
dataset/ETHPy150Open turambar/pyDatasets/pydatasets/uci/eeg.py/EegTrial.to_csv