Skip to content

Commit fa84a3c

Browse files
committed
enh: add session 3 and 4 tutorials
1 parent acc6a8d commit fa84a3c

7 files changed

Lines changed: 2354 additions & 1873 deletions
Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"id": "0",
66
"metadata": {},
77
"source": [
8-
"# Exercises Pandas\n",
8+
"# Exercises Data\n",
9+
"\n",
910
"\n"
1011
]
1112
},
@@ -41,6 +42,21 @@
4142
"cell_type": "markdown",
4243
"id": "3",
4344
"metadata": {},
45+
"source": [
46+
"Exercise 0\n",
47+
"\n",
48+
"Refresher on numpy.\n",
49+
"\n",
50+
"1. Create a random number generator with a seed.\n",
51+
"2. Create two numpy array with random normal distribution with mean 0 and standard deviation 1 and shape 10'000'000.\n",
52+
"3. Add them using the %timeit magic in the cell\n",
53+
"4. Create two lists with the same numbers and add them using the %timeit magic in the cell. You will need a for loop for it."
54+
]
55+
},
56+
{
57+
"cell_type": "markdown",
58+
"id": "4",
59+
"metadata": {},
4460
"source": [
4561
"## Exercise 1:\n",
4662
"\n",
@@ -53,14 +69,14 @@
5369
{
5470
"cell_type": "code",
5571
"execution_count": null,
56-
"id": "4",
72+
"id": "5",
5773
"metadata": {},
5874
"outputs": [],
5975
"source": []
6076
},
6177
{
6278
"cell_type": "markdown",
63-
"id": "5",
79+
"id": "6",
6480
"metadata": {},
6581
"source": [
6682
"## Exercise 2\n",
@@ -72,7 +88,7 @@
7288
{
7389
"cell_type": "code",
7490
"execution_count": null,
75-
"id": "6",
91+
"id": "7",
7692
"metadata": {},
7793
"outputs": [],
7894
"source": [
@@ -83,14 +99,14 @@
8399
{
84100
"cell_type": "code",
85101
"execution_count": null,
86-
"id": "7",
102+
"id": "8",
87103
"metadata": {},
88104
"outputs": [],
89105
"source": []
90106
},
91107
{
92108
"cell_type": "markdown",
93-
"id": "8",
109+
"id": "9",
94110
"metadata": {},
95111
"source": [
96112
"## Exercise 3\n",

session3/numpy_basics.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@
701701
"cell_type": "markdown",
702702
"metadata": {},
703703
"source": [
704-
"## Array Concatenation and Splitting\n",
704+
"## Array Concatenation\n",
705705
"\n",
706706
"All of the preceding routines worked on single arrays. It's also possible to combine multiple arrays into one, and to conversely split a single array into multiple arrays. We'll take a look at those operations here."
707707
]

session3/pandas_data_manipulation.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,8 @@
569569
"source": [
570570
"df = pd.DataFrame([[1, np.nan, 2],\n",
571571
" [2, 3, 5],\n",
572-
" [np.nan, 4, 6]])"
572+
" [np.nan, 4, 6],\n",
573+
" [np.nan, 4, 6],])"
573574
]
574575
},
575576
{

0 commit comments

Comments
 (0)