diff --git a/100-pandas-puzzles.ipynb b/100-pandas-puzzles.ipynb index bcafc2be8..3e40c1d8c 100644 --- a/100-pandas-puzzles.ipynb +++ b/100-pandas-puzzles.ipynb @@ -41,12 +41,14 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": { - "collapsed": true + "tags": [] }, "outputs": [], - "source": [] + "source": [ + "import pandas as pd" + ] }, { "cell_type": "markdown", @@ -57,12 +59,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": { - "collapsed": true + "tags": [] }, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/plain": [ + "'1.5.3'" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "pd.__version__" + ] }, { "cell_type": "markdown", @@ -75,7 +90,7 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "tags": [] }, "outputs": [], "source": [] @@ -112,9 +127,9 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 80, "metadata": { - "collapsed": true + "tags": [] }, "outputs": [], "source": [ @@ -127,7 +142,7 @@ "\n", "labels = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']\n", "\n", - "df = # (complete this line of code)" + "df = pd.DataFrame(data, index = labels)" ] }, { @@ -139,12 +154,32 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 48, "metadata": { - "collapsed": true + "tags": [] }, - "outputs": [], - "source": [] + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 10 entries, a to j\n", + "Data columns (total 4 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 animal 10 non-null object \n", + " 1 age 8 non-null float64\n", + " 2 visits 10 non-null int64 \n", + " 3 priority 10 non-null object \n", + "dtypes: float64(1), int64(1), object(2)\n", + "memory usage: 400.0+ bytes\n" + ] + } + ], + "source": [ + "df.info()" + ] }, { "cell_type": "markdown", @@ -155,12 +190,79 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 49, "metadata": { - "collapsed": true + "tags": [] }, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
animalagevisitspriority
acat2.51yes
bcat3.03yes
csnake0.52no
\n", + "
" + ], + "text/plain": [ + " animal age visits priority\n", + "a cat 2.5 1 yes\n", + "b cat 3.0 3 yes\n", + "c snake 0.5 2 no" + ] + }, + "execution_count": 49, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.head(3)" + ] }, { "cell_type": "markdown", @@ -171,12 +273,113 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 50, "metadata": { - "collapsed": true + "tags": [] }, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
animalage
acat2.5
bcat3.0
csnake0.5
ddogNaN
edog5.0
fcat2.0
gsnake4.5
hcatNaN
idog7.0
jdog3.0
\n", + "
" + ], + "text/plain": [ + " animal age\n", + "a cat 2.5\n", + "b cat 3.0\n", + "c snake 0.5\n", + "d dog NaN\n", + "e dog 5.0\n", + "f cat 2.0\n", + "g snake 4.5\n", + "h cat NaN\n", + "i dog 7.0\n", + "j dog 3.0" + ] + }, + "execution_count": 50, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df[['animal', 'age']]" + ] }, { "cell_type": "markdown", @@ -187,12 +390,71 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 51, "metadata": { - "collapsed": true + "tags": [] }, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
animalage
ddogNaN
edog5.0
idog7.0
\n", + "
" + ], + "text/plain": [ + " animal age\n", + "d dog NaN\n", + "e dog 5.0\n", + "i dog 7.0" + ] + }, + "execution_count": 51, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.iloc[[3,4,8], [0,1]]" + ] }, { "cell_type": "markdown", @@ -203,12 +465,57 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 52, "metadata": { - "collapsed": true + "tags": [] }, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
animalagevisitspriority
\n", + "
" + ], + "text/plain": [ + "Empty DataFrame\n", + "Columns: [animal, age, visits, priority]\n", + "Index: []" + ] + }, + "execution_count": 52, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df[df['visits'] > 3]" + ] }, { "cell_type": "markdown", @@ -219,12 +526,71 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 53, "metadata": { - "collapsed": true + "tags": [] }, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
animalagevisitspriority
ddogNaN3yes
hcatNaN1yes
\n", + "
" + ], + "text/plain": [ + " animal age visits priority\n", + "d dog NaN 3 yes\n", + "h cat NaN 1 yes" + ] + }, + "execution_count": 53, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df[df['age'].isnull()]" + ] }, { "cell_type": "markdown", @@ -235,12 +601,71 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 54, "metadata": { - "collapsed": true + "tags": [] }, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
animalagevisitspriority
acat2.51yes
fcat2.03no
\n", + "
" + ], + "text/plain": [ + " animal age visits priority\n", + "a cat 2.5 1 yes\n", + "f cat 2.0 3 no" + ] + }, + "execution_count": 54, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df[(df['animal'] == 'cat') & (df['age'] < 3)]" + ] }, { "cell_type": "markdown", @@ -251,12 +676,87 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 55, "metadata": { - "collapsed": true + "tags": [] }, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
animalagevisitspriority
acat2.51yes
bcat3.03yes
fcat2.03no
jdog3.01no
\n", + "
" + ], + "text/plain": [ + " animal age visits priority\n", + "a cat 2.5 1 yes\n", + "b cat 3.0 3 yes\n", + "f cat 2.0 3 no\n", + "j dog 3.0 1 no" + ] + }, + "execution_count": 55, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df[(df['age'] >= 2) & (df['age'] <= 4)]" + ] }, { "cell_type": "markdown", @@ -267,12 +767,14 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 56, "metadata": { - "collapsed": true + "tags": [] }, "outputs": [], - "source": [] + "source": [ + "df.loc['f', 'age'] = 1.5" + ] }, { "cell_type": "markdown", @@ -283,12 +785,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 57, "metadata": { - "collapsed": true + "tags": [] }, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/plain": [ + "19" + ] + }, + "execution_count": 57, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df['visits'].sum()" + ] }, { "cell_type": "markdown", @@ -299,12 +814,29 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 58, "metadata": { - "collapsed": true + "tags": [] }, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/plain": [ + "animal\n", + "cat 2.333333\n", + "dog 5.000000\n", + "snake 2.500000\n", + "Name: age, dtype: float64" + ] + }, + "execution_count": 58, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.groupby('animal')['age'].mean()" + ] }, { "cell_type": "markdown", @@ -315,12 +847,14 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 59, "metadata": { - "collapsed": true + "tags": [] }, "outputs": [], - "source": [] + "source": [ + "df.loc['k'] = ['turtue', 2, 5, 'no']" + ] }, { "cell_type": "markdown", @@ -331,12 +865,31 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 60, "metadata": { - "collapsed": true + "tags": [] }, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/plain": [ + "animal\n", + "cat 4\n", + "dog 4\n", + "snake 2\n", + "turtue 1\n", + "dtype: int64" + ] + }, + "execution_count": 60, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# df.groupby('animal').size()\n", + "df.value_counts('animal')" + ] }, { "cell_type": "markdown", @@ -347,12 +900,144 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 61, "metadata": { - "collapsed": true + "tags": [] }, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
animalagevisitspriority
acat2.51yes
bcat3.03yes
csnake0.52no
ddogNaN3yes
edog5.02no
fcat1.53no
gsnake4.51no
hcatNaN1yes
idog7.02no
jdog3.01no
kturtue2.05no
\n", + "
" + ], + "text/plain": [ + " animal age visits priority\n", + "a cat 2.5 1 yes\n", + "b cat 3.0 3 yes\n", + "c snake 0.5 2 no\n", + "d dog NaN 3 yes\n", + "e dog 5.0 2 no\n", + "f cat 1.5 3 no\n", + "g snake 4.5 1 no\n", + "h cat NaN 1 yes\n", + "i dog 7.0 2 no\n", + "j dog 3.0 1 no\n", + "k turtue 2.0 5 no" + ] + }, + "execution_count": 61, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.sort_values(['age', 'visits'], ascending = [False, True])\n", + "df" + ] }, { "cell_type": "markdown", @@ -363,12 +1048,137 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 81, "metadata": { - "collapsed": true + "tags": [] }, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
animalagevisitspriority
acat2.51True
bcat3.03True
csnake0.52False
ddogNaN3True
edog5.02False
fcat2.03False
gsnake4.51False
hcatNaN1True
idog7.02False
jdog3.01False
\n", + "
" + ], + "text/plain": [ + " animal age visits priority\n", + "a cat 2.5 1 True\n", + "b cat 3.0 3 True\n", + "c snake 0.5 2 False\n", + "d dog NaN 3 True\n", + "e dog 5.0 2 False\n", + "f cat 2.0 3 False\n", + "g snake 4.5 1 False\n", + "h cat NaN 1 True\n", + "i dog 7.0 2 False\n", + "j dog 3.0 1 False" + ] + }, + "execution_count": 81, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# df['priority'] = df['priority'].apply(lambda x: True if x == 'yes' else False)\n", + "df['priority'] = df['priority'].map({'yes': True, 'no': False})\n", + "df" + ] }, { "cell_type": "markdown", @@ -379,12 +1189,136 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 82, "metadata": { - "collapsed": true + "tags": [] }, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
animalagevisitspriority
acat2.51True
bcat3.03True
cpython0.52False
ddogNaN3True
edog5.02False
fcat2.03False
gpython4.51False
hcatNaN1True
idog7.02False
jdog3.01False
\n", + "
" + ], + "text/plain": [ + " animal age visits priority\n", + "a cat 2.5 1 True\n", + "b cat 3.0 3 True\n", + "c python 0.5 2 False\n", + "d dog NaN 3 True\n", + "e dog 5.0 2 False\n", + "f cat 2.0 3 False\n", + "g python 4.5 1 False\n", + "h cat NaN 1 True\n", + "i dog 7.0 2 False\n", + "j dog 3.0 1 False" + ] + }, + "execution_count": 82, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df['animal'] = df['animal'].apply(lambda x: 'python' if x == 'snake' else x)\n", + "df" + ] }, { "cell_type": "markdown", @@ -395,12 +1329,82 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 87, "metadata": { - "collapsed": true + "tags": [] }, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
visits123
animal
cat2.5NaN2.5
dog3.06.0NaN
python4.50.5NaN
\n", + "
" + ], + "text/plain": [ + "visits 1 2 3\n", + "animal \n", + "cat 2.5 NaN 2.5\n", + "dog 3.0 6.0 NaN\n", + "python 4.5 0.5 NaN" + ] + }, + "execution_count": 87, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.pivot_table(index = 'animal', columns = 'visits', values = 'age', aggfunc = 'mean')" + ] }, { "cell_type": "markdown", @@ -456,7 +1460,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -477,7 +1484,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -497,7 +1507,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -560,7 +1573,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [ @@ -599,7 +1615,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [ @@ -642,7 +1661,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -663,7 +1685,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [ @@ -707,7 +1732,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -759,7 +1787,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -788,7 +1819,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -804,7 +1838,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -820,7 +1857,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -836,7 +1876,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -852,7 +1895,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -905,7 +1951,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -921,7 +1970,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -937,7 +1989,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -953,7 +2008,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -969,7 +2027,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -987,7 +2048,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1009,9 +2073,7 @@ }, { "cell_type": "markdown", - "metadata": { - "collapsed": true - }, + "metadata": {}, "source": [ "## Using MultiIndexes\n", "\n", @@ -1037,7 +2099,10 @@ "cell_type": "code", "execution_count": 3, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1053,7 +2118,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1069,7 +2137,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1085,7 +2156,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1101,7 +2175,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1117,7 +2194,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1177,7 +2257,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1193,7 +2276,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1211,7 +2297,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1227,7 +2316,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1243,7 +2335,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1285,7 +2380,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1312,7 +2410,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1337,7 +2438,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1366,7 +2470,10 @@ "cell_type": "code", "execution_count": 1, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [ @@ -1421,7 +2528,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1437,7 +2547,10 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true + "collapsed": true, + "jupyter": { + "outputs_hidden": true + } }, "outputs": [], "source": [] @@ -1452,7 +2565,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -1466,9 +2579,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.4" + "version": "3.10.9" } }, "nbformat": 4, - "nbformat_minor": 1 + "nbformat_minor": 4 } diff --git a/README.md b/README.md index 3f378ba9b..04eeae8fc 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ The exercises are loosely divided in sections. Each section has a difficulty rat Good luck solving the puzzles! +-- Akash + *\* the list of puzzles is not yet complete! Pull requests or suggestions for additional exercises, corrections and improvements are welcomed.* ## Overview of puzzles