I have a pandas dataframe for one subject with following columns:
df = {time, channel1, event, epoch_number)
event = [‘A’, ‘B’, ‘C’]
epoch_number = {‘A’: [1,2], ‘B’:[1,2], ‘C’: [1,2,3,4,5]}
sampling frequency = 250
I have to average the data across epochs for each event (evoked). The resultant data should be in the form:
res_df = [time, channel, event]
I tried reshaping the data by using (pivot_table) and followed mne tutorial but could not figure out.
Thanks for the help.