I want to perform a 2nd level analysis and I would like to know how the data frame (second_level_input) to pass to this fit function should be.

fit(second_level_input, confounds=None, design_matrix=None)

I have already performed the 1st level analysis obtaining the betas for each EEG channel and for each subject from the two groups whose I want to find the significant differences in the electrical activity.

Could you share an example so that I can see how the data frame second_level_input is organised?

From the 1st level analysis I have the following data frame (see screenshot)

In the tutorial of the function fit I found this:

If second-level_input is a pandas DataFrame, then they have to contain subject_label, map_name and effects_map_path. It can contain multiple maps that would be selected during contrast estimation with the argument first_level_contrast of the compute_contrast function. The DataFrame will be sorted based on the subject_label column to avoid order inconsistencies when extracting the maps. So the rows of the automatically computed design matrix, if not provided, will correspond to the sorted subject_label column.

How should the effect map be? Should they contain just the beta or theta? Or can they contain also other columns like in the previous screenshot that I posted?

Could anyone help me?

Thank you