Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rasbt committed Jul 9, 2019
1 parent ff97614 commit 470e19c
Show file tree
Hide file tree
Showing 13 changed files with 187 additions and 37 deletions.
2 changes: 1 addition & 1 deletion ch01/ch01.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.7.1"
}
},
"nbformat": 4,
Expand Down
10 changes: 9 additions & 1 deletion ch02/ch02.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"*The use of `watermark` is optional. You can install this IPython extension via \"`pip install watermark`\". For more information, please see: https://github.com/rasbt/watermark.*"
"*The use of `watermark` is optional. You can install this Jupyter extension via* \n",
"\n",
" conda install watermark -c conda-forge \n",
"\n",
"or \n",
"\n",
" pip install watermark \n",
"\n",
"*For more information, please see: https://github.com/rasbt/watermark.*"
]
},
{
Expand Down
10 changes: 9 additions & 1 deletion ch03/ch03.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"*The use of `watermark` is optional. You can install this IPython extension via \"`pip install watermark`\". For more information, please see: https://github.com/rasbt/watermark.*"
"*The use of `watermark` is optional. You can install this Jupyter extension via* \n",
"\n",
" conda install watermark -c conda-forge \n",
"\n",
"or \n",
"\n",
" pip install watermark \n",
"\n",
"*For more information, please see: https://github.com/rasbt/watermark.*"
]
},
{
Expand Down
88 changes: 85 additions & 3 deletions ch04/ch04.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"output_type": "stream",
"text": [
"Sebastian Raschka \n",
"last updated: 2019-06-16 \n",
"last updated: 2019-07-09 \n",
"\n",
"numpy 1.16.2\n",
"pandas 0.24.2\n",
Expand All @@ -60,7 +60,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"*The use of `watermark` is optional. You can install this IPython extension via \"`pip install watermark`\". For more information, please see: https://github.com/rasbt/watermark.*"
"*The use of `watermark` is optional. You can install this Jupyter extension via* \n",
"\n",
" conda install watermark -c conda-forge \n",
"\n",
"or \n",
"\n",
" pip install watermark \n",
"\n",
"*For more information, please see: https://github.com/rasbt/watermark.*"
]
},
{
Expand Down Expand Up @@ -616,7 +624,7 @@
}
],
"source": [
"# drop rows that have less than 3 real values \n",
"# drop rows that have fewer than 3 real values \n",
"\n",
"df.dropna(thresh=4)"
]
Expand Down Expand Up @@ -767,6 +775,80 @@
"<br>"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>A</th>\n",
" <th>B</th>\n",
" <th>C</th>\n",
" <th>D</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1.0</td>\n",
" <td>2.0</td>\n",
" <td>3.0</td>\n",
" <td>4.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>5.0</td>\n",
" <td>6.0</td>\n",
" <td>7.5</td>\n",
" <td>8.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>10.0</td>\n",
" <td>11.0</td>\n",
" <td>12.0</td>\n",
" <td>6.0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" A B C D\n",
"0 1.0 2.0 3.0 4.0\n",
"1 5.0 6.0 7.5 8.0\n",
"2 10.0 11.0 12.0 6.0"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.fillna(df.mean())"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
10 changes: 9 additions & 1 deletion ch05/ch05.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"*The use of `watermark` is optional. You can install this IPython extension via \"`pip install watermark`\". For more information, please see: https://github.com/rasbt/watermark.*"
"*The use of `watermark` is optional. You can install this Jupyter extension via* \n",
"\n",
" conda install watermark -c conda-forge \n",
"\n",
"or \n",
"\n",
" pip install watermark \n",
"\n",
"*For more information, please see: https://github.com/rasbt/watermark.*"
]
},
{
Expand Down
10 changes: 9 additions & 1 deletion ch06/ch06.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"*The use of `watermark` is optional. You can install this IPython extension via \"`pip install watermark`\". For more information, please see: https://github.com/rasbt/watermark.*"
"*The use of `watermark` is optional. You can install this Jupyter extension via* \n",
"\n",
" conda install watermark -c conda-forge \n",
"\n",
"or \n",
"\n",
" pip install watermark \n",
"\n",
"*For more information, please see: https://github.com/rasbt/watermark.*"
]
},
{
Expand Down
12 changes: 10 additions & 2 deletions ch07/ch07.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"*The use of `watermark` is optional. You can install this IPython extension via \"`pip install watermark`\". For more information, please see: https://github.com/rasbt/watermark.*"
"*The use of `watermark` is optional. You can install this Jupyter extension via* \n",
"\n",
" conda install watermark -c conda-forge \n",
"\n",
"or \n",
"\n",
" pip install watermark \n",
"\n",
"*For more information, please see: https://github.com/rasbt/watermark.*"
]
},
{
Expand Down Expand Up @@ -1693,7 +1701,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.7.1"
},
"toc": {
"nav_menu": {},
Expand Down
12 changes: 10 additions & 2 deletions ch08/ch08.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"*The use of `watermark` is optional. You can install this IPython extension via \"`pip install watermark`\". For more information, please see: https://github.com/rasbt/watermark.*"
"*The use of `watermark` is optional. You can install this Jupyter extension via* \n",
"\n",
" conda install watermark -c conda-forge \n",
"\n",
"or \n",
"\n",
" pip install watermark \n",
"\n",
"*For more information, please see: https://github.com/rasbt/watermark.*"
]
},
{
Expand Down Expand Up @@ -1887,7 +1895,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.7.1"
},
"toc": {
"nav_menu": {},
Expand Down
10 changes: 9 additions & 1 deletion ch09/ch09.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"*The use of `watermark` is optional. You can install this IPython extension via \"`pip install watermark`\". For more information, please see: https://github.com/rasbt/watermark.*"
"*The use of `watermark` is optional. You can install this Jupyter extension via* \n",
"\n",
" conda install watermark -c conda-forge \n",
"\n",
"or \n",
"\n",
" pip install watermark \n",
"\n",
"*For more information, please see: https://github.com/rasbt/watermark.*"
]
},
{
Expand Down
46 changes: 24 additions & 22 deletions ch10/ch10.ipynb

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion ch10/ch10.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,10 +505,12 @@ def lin_regplot(X, y, model):
plt.scatter(X, y, label='training points')
plt.plot(X_fit, y_lin_fit, label='linear fit', linestyle='--')
plt.plot(X_fit, y_quad_fit, label='quadratic fit')
plt.xlabel('Explanatory variable')
plt.ylabel('Predicted or known target values')
plt.legend(loc='upper left')

plt.tight_layout()
#plt.savefig('images/10_10.png', dpi=300)
plt.savefig('images/10_10.png', dpi=300)
plt.show()


Expand Down
Binary file modified ch10/images/10_10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion ch11/ch11.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"*The use of `watermark` is optional. You can install this IPython extension via \"`pip install watermark`\". For more information, please see: https://github.com/rasbt/watermark.*"
"*The use of `watermark` is optional. You can install this Jupyter extension via* \n",
"\n",
" conda install watermark -c conda-forge \n",
"\n",
"or \n",
"\n",
" pip install watermark \n",
"\n",
"*For more information, please see: https://github.com/rasbt/watermark.*"
]
},
{
Expand Down

0 comments on commit 470e19c

Please sign in to comment.