{ "cells": [ { "cell_type": "markdown", "id": "247bbf84", "metadata": {}, "source": [ "# Window functions for tabular data" ] }, { "cell_type": "code", "execution_count": 1, "id": "44584190", "metadata": {}, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "markdown", "id": "83bbd275", "metadata": {}, "source": [ "# Load experimental data" ] }, { "cell_type": "code", "execution_count": 2, "id": "88b9e189", "metadata": {}, "outputs": [], "source": [ "df = pd.read_csv('timed_responses.csv', index_col=0)" ] }, { "cell_type": "code", "execution_count": 3, "id": "987a3518", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | subject_id | \n", "time (ms) | \n", "response | \n", "accuracy | \n", "
---|---|---|---|---|
574 | \n", "3 | \n", "540 | \n", "RIGHT | \n", "0.04 | \n", "
1190 | \n", "2 | \n", "552 | \n", "LEFT | \n", "0.43 | \n", "
1895 | \n", "2 | \n", "1036 | \n", "LEFT | \n", "0.36 | \n", "
53 | \n", "3 | \n", "257 | \n", "RIGHT | \n", "0.11 | \n", "
158 | \n", "2 | \n", "743 | \n", "RIGHT | \n", "0.32 | \n", "
551 | \n", "3 | \n", "619 | \n", "LEFT | \n", "0.25 | \n", "
1602 | \n", "1 | \n", "43 | \n", "RIGHT | \n", "0.65 | \n", "
413 | \n", "1 | \n", "471 | \n", "LEFT | \n", "0.80 | \n", "
785 | \n", "1 | \n", "121 | \n", "LEFT | \n", "0.10 | \n", "
1393 | \n", "2 | \n", "903 | \n", "RIGHT | \n", "0.33 | \n", "
629 | \n", "2 | \n", "353 | \n", "LEFT | \n", "0.17 | \n", "
1829 | \n", "3 | \n", "768 | \n", "RIGHT | \n", "0.26 | \n", "
902 | \n", "1 | \n", "1093 | \n", "LEFT | \n", "0.34 | \n", "
1486 | \n", "2 | \n", "3 | \n", "RIGHT | \n", "0.29 | \n", "