

def to_csv(self, path='', filename_base=None):
    'Store EegTrial to disk as three CSVs: data, channel dictionary, info.\n\n        Keyword arguments:\n        path -- directory to store CSVs\n        filename_base -- base of filename (extensions will be appended)\n        '
    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()
    filename_base.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()

dataset/ETHPy150Open turambar/pyDatasets/pydatasets/uci/eeg.py EegTrial.to_csv/VarMisuse@88/207 `temp`->`filename_base`