Skip to content

Commit 0513461

Browse files
committed
Add patient data hands-on
1 parent 4a99abc commit 0513461

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

hands-on/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Hands-on
2+
3+
Here you find some notebooks that can be used during the training session
4+
to follow along, or for hands-on sessions.
5+
6+
## What is it?
7+
1. [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/gjbex/Python-for-data-science/blob/master/hands-on/patient_data.ipynb) [`patient_data.ipynb`](patient_data.ipynb):
8+
illustrates using pandas for data analysis and seaborn for visualizations.

hands-on/patient_data.ipynb

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,31 @@
4646
"## Experiment data"
4747
]
4848
},
49+
{
50+
"cell_type": "code",
51+
"execution_count": null,
52+
"metadata": {},
53+
"outputs": [],
54+
"source": [
55+
"import pandas as pd"
56+
]
57+
},
4958
{
5059
"cell_type": "markdown",
5160
"metadata": {},
5261
"source": [
5362
"Read the data set as a pandas `DataFrame` from an Excel spreadsheet."
5463
]
5564
},
65+
{
66+
"cell_type": "code",
67+
"execution_count": null,
68+
"metadata": {},
69+
"outputs": [],
70+
"source": [
71+
"experiment_data = pd.read_excel('https://github.com/gjbex/Python-for-data-science/blob/master/source-code/pandas/data/patient_experiment.xlsx?raw=true')"
72+
]
73+
},
5674
{
5775
"cell_type": "markdown",
5876
"metadata": {},
@@ -249,6 +267,15 @@
249267
"There is a second file with metadata on the patients, let's read that as well. The file is `data/patient_metadata.xlsx`."
250268
]
251269
},
270+
{
271+
"cell_type": "code",
272+
"execution_count": null,
273+
"metadata": {},
274+
"outputs": [],
275+
"source": [
276+
"metadata = pd.read_excel('https://github.com/gjbex/Python-for-data-science/blob/master/source-code/pandas/data/patient_metadata.xlsx?raw=true')"
277+
]
278+
},
252279
{
253280
"cell_type": "markdown",
254281
"metadata": {},
@@ -444,7 +471,7 @@
444471
"name": "python",
445472
"nbconvert_exporter": "python",
446473
"pygments_lexer": "ipython3",
447-
"version": "3.6.2"
474+
"version": "3.7.5"
448475
}
449476
},
450477
"nbformat": 4,

0 commit comments

Comments
 (0)