| Reference | Downloads | Github

Displaying results to the participant

Hello everyone! This is my first time using psychopy. I’m just trying to figure out how I can access information stored in the data file. I’m using the thisExp.addData function and the required info is being stored to the data file just as planned. However, I want to be able to display a column of that data to the participant at the end of the experiment. I can’t figure out how to do that. Please and thank you!

@unagi_pie, do you want to show the participant the data in a spreadsheet or on screen as part of the experiment?

Oh sorry, I should have been more specific. Yeah, I want to display the data to the participant on the screen.

@unagi_pie, in the attached example I have looped the presentation of a word and collect keyboard responses to that word. Reaction times to the word are saved under the heading “response.rt” in the experiment handle. To present the list of RTs at the end of the experiment, you need to add a new routine at the end of your experiment with a code component, text component and keyboard component (for ending the presentation). Add the following code to the “Begin Routine” tab in the code component:

import pandas as pd
rtColumn = thisExp.entries
rtColumn = pd.DataFrame(rtColumn)
rtColumn = rtColumn['response.rt'].to_string()

Then, link rtColumn variable to the text component, and this will then be presented as text in the text component. To change the column, just change the column name from “response.rt” to whatever column you want. See here for example (created in version 1.90.1) presentCol.psyexp (8.8 KB)


dvbridges Thank you! That worked perfectly.