Issues with group analysis

Hi I am having some issues with averaging epochs into evoked files for multiple participants at once and I canā€™t find any information on it.

Normally you would do something like:

condition1_evokeds = epochs[ā€˜condition1ā€™].average()

But I canā€™t get this to work with my for loop, reading in multiple epopched files into one dictionary using the code:

epochs = {}
for i, idx in enumerate(conditions):
epochs[i] = [mne.read_epochs(d, preload=True)[idx] for d in data_files]

How to I take the epoch dictionary and average it out, or turn it into evokeds so that I can plot certain conditions?

Thank you for any help!

Please provide more code context and an error message. Itā€™s difficult to help otherwise. Thanks!

So I am looking to do some group analysis with the epochs structure (especially some TFR work) but when I read in my epochs using the above for loop, and then isolate a condition to create a list, I canā€™t run epochs.compute_psd().

Is there any documentation on running group analysis on these sorts of things? For example, I would like to do some ERDS at the group level using this tutorial (Compute and visualize ERDS maps ā€” MNE 1.4.2 documentation) but it is for one file not many.