def DS():
import os
import pandas as pd
directory=input('What folder would you like to work in? ( Example: /Users/hem/Desktop/pythontest/ ')
filename=input('Please enter the name (including .csv) of the file you would like to analyze ' )
idkey=input('What is the subject ID you are analyzing? ' )
sessionkey=input('What session of testing are you analyzing? ')
print('---------- Calculating Drug Stroop endpoints ----------')
os.chdir(directory)
dataframe = pd.read_csv(filename, error_bad_lines=False)
output={}
CategoryID = dataframe['CategoryID'].tolist
ReactionTime = dataframe['ReactionTime'].tolist
CorrectResponse = dataframe['CorrectResponse'].tolist
#Stroop interference score
totalN = …
Run Code Online (Sandbox Code Playgroud)