{ "cells": [ { "cell_type": "markdown", "id": "6f634238", "metadata": {}, "source": [ "# Exercise: Compute summary statistics for the neural data" ] }, { "cell_type": "code", "execution_count": 2, "id": "8f9bc8b1", "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "\n", "import matplotlib.pyplot as plt\n", "import pandas as pd\n", "\n", "# Set some Pandas options: maximum number of rows/columns it's going to display\n", "pd.set_option('display.max_rows', 1000)\n", "pd.set_option('display.max_columns', 100)" ] }, { "cell_type": "markdown", "id": "141ca000", "metadata": {}, "source": [ "# Load the processed neural data" ] }, { "cell_type": "code", "execution_count": 3, "id": "d2dfebd3", "metadata": {}, "outputs": [], "source": [ "df = pd.read_csv('processed_QC_passed_2024-07-04_collected_v1.csv')" ] }, { "cell_type": "code", "execution_count": 4, "id": "09554c84", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(659, 35)" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.shape" ] }, { "cell_type": "code", "execution_count": 5, "id": "df95a10b", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | OP | \n", "filename | \n", "slice | \n", "cell_ch | \n", "cell_ID | \n", "day | \n", "treatment | \n", "hrs_incubation | \n", "repatch | \n", "hrs_after_OP | \n", "Rs | \n", "Rin | \n", "resting_potential | \n", "max_spikes | \n", "Rheobase | \n", "AP_heigth | \n", "TH | \n", "max_depol | \n", "max_repol | \n", "membra_time_constant_tau | \n", "capacitance | \n", "comments | \n", "rheo_ramp | \n", "AP_halfwidth | \n", "Rheobse_ramp | \n", "Unnamed: 27 | \n", "rheos_ramp | \n", "comment | \n", "\n", " | high K concentration | \n", "RMP_from_char | \n", "tissue_source | \n", "area | \n", "patient_age | \n", "patcher | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "OP230420 | \n", "23420003.abf | \n", "S1 | \n", "1 | \n", "23420S1c1 | \n", "D1 | \n", "TTX | \n", "0.0 | \n", "no | \n", "10.416389 | \n", "6.675643 | \n", "39.025301 | \n", "-74.285889 | \n", "24 | \n", "200.0 | \n", "80.749512 | \n", "-35.278320 | \n", "336.181641 | \n", "-60.791016 | \n", "19.40 | \n", "510.601767 | \n", "0 | \n", "753.380113 | \n", "1.151009 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "8 mM | \n", "-61.828554 | \n", "Bielefeld | \n", "temporal | \n", "13.0 | \n", "Verji | \n", "
1 | \n", "OP230420 | \n", "23420003.abf | \n", "S1 | \n", "3 | \n", "23420S1c3 | \n", "D1 | \n", "TTX | \n", "0.0 | \n", "no | \n", "10.416389 | \n", "7.867174 | \n", "48.728367 | \n", "-69.573975 | \n", "26 | \n", "300.0 | \n", "78.448486 | \n", "-32.043457 | \n", "350.097656 | \n", "-67.138672 | \n", "17.30 | \n", "393.397918 | \n", "1 | \n", "585.102837 | \n", "1.006321 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "8 mM | \n", "-60.460298 | \n", "Bielefeld | \n", "temporal | \n", "13.0 | \n", "Verji | \n", "
2 | \n", "OP230420 | \n", "23420003.abf | \n", "S1 | \n", "6 | \n", "23420S1c6 | \n", "D1 | \n", "TTX | \n", "0.0 | \n", "no | \n", "10.416389 | \n", "8.820134 | \n", "35.971082 | \n", "-54.956055 | \n", "22 | \n", "300.0 | \n", "76.660156 | \n", "-29.827881 | \n", "270.629883 | \n", "-52.246094 | \n", "14.85 | \n", "426.098774 | \n", "3 | \n", "173.915797 | \n", "1.266335 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "8 mM | \n", "-59.615979 | \n", "Bielefeld | \n", "temporal | \n", "13.0 | \n", "Verji | \n", "
3 | \n", "OP230420 | \n", "23420003.abf | \n", "S1 | \n", "8 | \n", "23420S1c8 | \n", "D1 | \n", "TTX | \n", "0.0 | \n", "yes | \n", "10.416389 | \n", "6.000400 | \n", "31.599917 | \n", "-70.550537 | \n", "22 | \n", "350.0 | \n", "81.011963 | \n", "-33.068848 | \n", "309.448242 | \n", "-61.401367 | \n", "16.65 | \n", "575.513924 | \n", "5 | \n", "786.927898 | \n", "1.182830 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "8 mM | \n", "-60.956350 | \n", "Bielefeld | \n", "temporal | \n", "13.0 | \n", "Verji | \n", "
4 | \n", "OP230420 | \n", "23420061.abf | \n", "S1_D2 | \n", "8 | \n", "23420S1c8 | \n", "D2 | \n", "TTX | \n", "19.0 | \n", "yes | \n", "29.633333 | \n", "8.271614 | \n", "30.607259 | \n", "-70.745850 | \n", "1 | \n", "1300.0 | \n", "48.883057 | \n", "-20.855713 | \n", "100.952148 | \n", "-27.465820 | \n", "13.25 | \n", "864.892430 | \n", "29 | \n", "565.938865 | \n", "1.504127 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "8 mM | \n", "-61.283967 | \n", "Bielefeld | \n", "temporal | \n", "13.0 | \n", "Verji | \n", "