8/31/2023 0 Comments Psychopy excel output![]() ![]() So I think at this stage you might be doing a bit more work than needed… let PsychoPy do the heavy lifting for you. If needed, I guess you could also just include a function at the end to save that file in. responses, reaction times, etc) that are measured during the experiment. csv data file which includes all of the columns in that conditions file, as well as all of the variables (e.g. At the end of the experiment, Builder will save a. So you could just connect a loop in the flow panel to your Excel file, which will automatically read in all of the columns and make the values in each row available on each trial. It seems like you are using the Builder interface, as you are passing on a. You might be better off using PsychoPy’s built-in functions and classes to do this. I need to read in (and later write to) a spreadsheet which contains several lists ( of strings and numerics). PsychoPy bundles the third-party pandas library, so yes, anyone running the PsychoPy standalone distribution will be able to import pandas. Logging.log(level=logging.ERROR, msg=msg_error)įurthermore: Can I assume that this code will work on anyone’s machine that has PsychoPy installed or might there be a problem with missing imports (I dont know how imports work in python)?Ĭan I assume that this code will work on anyone’s machine that has PsychoPy installed or might there be a problem with missing imports (I dont know how imports work in python)? Msg_error = "Fehler beim Öffnen der Datei '' gefunden werden.".format(file_name_in, error) ListAffectPosition = pdSetupFile.tolist() PdSetupFile = pd.read_excel(setupFilename) I do wonder, though: is using pandas “overkill” for just reading in an xlsx file? import pandas as pd Since I’m not fluent in Python (and programming in general) myself, I do need to ask, though: Is there a “gold standard” for reading and writing xlsx files? Furthermore Excel uses a different delimiter when writing csv.Īnd since I don’t know which program for editing the spreadsheet will be used in the future, this behavior introduces problems I’m not able to solve. At first I thought *.csv would do the trick, but it turned out that MS Excel uses a different character encoding for csv than Open Office (non english country). I need to set it up and hand them the *.psyepx file so they can use it. I’m supposed to create an experiment for a group of students. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |