I am getting this error when using the counting trial’s function (trials.thisTrialN):
name ‘trials’ is not defined
Do you have any idea why this may be? This is my code. I am trying to index the same column within 8 different spreadsheets I have in my experiment folder by using another spreadsheet (Randomize_Runs) which lists each excel file name.
import pandas as pd
df_runs = pd.read_excel(‘Randomize_Runs.xlsx’)
df_runs = df_runs.sample(frac=1)
filename = df_runs.at[trials.thistrialIndex, ‘run’]