Update headers, contents, and navigation links to add Chapter 3

pull/22/head
Jake VanderPlas 2016-11-21 20:39:11 -08:00
parent d3a232e89a
commit 9ed67d7006
9 changed files with 79 additions and 22 deletions

View File

@ -38,22 +38,35 @@ I am currently editing these notebooks, and will post them as I make my way thro
- [Sorting Arrays](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/02.08-Sorting.ipynb)
- [Structured Data: NumPy's Structured Arrays](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/02.09-Structured-Data-NumPy.ipynb)
#### 3. Data Manipulation with Pandas *(coming soon)*
### [3. Data Manipulation with Pandas](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.00-Introduction-to-Pandas.ipynb)
- [Introducing Pandas Objects](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.01-Introducing-Pandas-Objects.ipynb)
- [Data Indexing and Selection](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.02-Data-Indexing-and-Selection.ipynb)
- [Operating on Data in Pandas](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.03-Operations-in-Pandas.ipynb)
- [Handling Missing Data](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.04-Missing-Values.ipynb)
- [Hierarchical Indexing](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.05-Hierarchical-Indexing.ipynb)
- [Combining Datasets: Concat and Append](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.06-Concat-And-Append.ipynb)
- [Combining Datasets: Merge and Join](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.07-Merge-and-Join.ipynb)
- [Aggregation and Grouping](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.08-Aggregation-and-Grouping.ipynb)
- [Pivot Tables](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.09-Pivot-Tables.ipynb)
- [Vectorized String Operations](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.10-Working-With-Strings.ipynb)
- [Working with Time Series](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.11-Working-with-Time-Series.ipynb)
- [High-Performance Pandas: eval() and query()](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.12-Performance-Eval-and-Query.ipynb)
- [Further Resources](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.13-Further-Resources.ipynb)
#### 4. Visualization with Matplotlib *(coming soon)*
#### 5. Machine Learning *(coming soon)*
### [Appendix: Figure Code](notebooks/06.00-Figure-Code.ipynb)
### [Appendix: Figure Code](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/06.00-Figure-Code.ipynb)
## Code Listings
The notebooks above are still being edited. In the meantime, you can see all
the code from the book in [code_listings](code_listings).
the code from an earlier draft of the book in [code_listings](code_listings).
The code is in IPython notebooks, organized by book chapter and section.
All code from this book was tested with Python 3.4-3.5, though it should be
near 100% compatible with Python 2.7 as well.
All code from this book was tested with Python 3.4-3.5, though most of it
is compatible with Python 2.7 as well.
## Figure Appendix

View File

@ -16,7 +16,7 @@
"metadata": {},
"source": [
"<!--NAVIGATION-->\n",
"< [Sorting Arrays](02.08-Sorting.ipynb) | [Contents](Index.ipynb) |"
"< [Sorting Arrays](02.08-Sorting.ipynb) | [Contents](Index.ipynb) | [Data Manipulation with Pandas](03.00-Introduction-to-Pandas.ipynb) >"
]
},
{
@ -569,7 +569,7 @@
"metadata": {},
"source": [
"<!--NAVIGATION-->\n",
"< [Sorting Arrays](02.08-Sorting.ipynb) | [Contents](Index.ipynb) |"
"< [Sorting Arrays](02.08-Sorting.ipynb) | [Contents](Index.ipynb) | [Data Manipulation with Pandas](03.00-Introduction-to-Pandas.ipynb) >"
]
}
],

View File

@ -16,7 +16,7 @@
"metadata": {},
"source": [
"<!--NAVIGATION-->\n",
"< [Handling Missing Data](03.04-Missing-Values.ipynb) | [Contents](Index.ipynb) | [Combining Datasets: Concat & Append](03.06-Concat-And-Append.ipynb) >"
"< [Handling Missing Data](03.04-Missing-Values.ipynb) | [Contents](Index.ipynb) | [Combining Datasets: Concat and Append](03.06-Concat-And-Append.ipynb) >"
]
},
{
@ -2489,7 +2489,7 @@
"metadata": {},
"source": [
"<!--NAVIGATION-->\n",
"< [Handling Missing Data](03.04-Missing-Values.ipynb) | [Contents](Index.ipynb) | [Combining Datasets: Concat & Append](03.06-Concat-And-Append.ipynb) >"
"< [Handling Missing Data](03.04-Missing-Values.ipynb) | [Contents](Index.ipynb) | [Combining Datasets: Concat and Append](03.06-Concat-And-Append.ipynb) >"
]
}
],

View File

@ -16,7 +16,7 @@
"metadata": {},
"source": [
"<!--NAVIGATION-->\n",
"< [Combining Datasets: Concat & Append](03.06-Concat-And-Append.ipynb) | [Contents](Index.ipynb) | [Aggregation and Grouping](03.08-Aggregation-and-Grouping.ipynb) >"
"< [Combining Datasets: Concat and Append](03.06-Concat-And-Append.ipynb) | [Contents](Index.ipynb) | [Aggregation and Grouping](03.08-Aggregation-and-Grouping.ipynb) >"
]
},
{
@ -3539,7 +3539,7 @@
"metadata": {},
"source": [
"<!--NAVIGATION-->\n",
"< [Combining Datasets: Concat & Append](03.06-Concat-And-Append.ipynb) | [Contents](Index.ipynb) | [Aggregation and Grouping](03.08-Aggregation-and-Grouping.ipynb) >"
"< [Combining Datasets: Concat and Append](03.06-Concat-And-Append.ipynb) | [Contents](Index.ipynb) | [Aggregation and Grouping](03.08-Aggregation-and-Grouping.ipynb) >"
]
}
],

View File

@ -16,7 +16,7 @@
"metadata": {},
"source": [
"<!--NAVIGATION-->\n",
"< [Vectorized String Operations](03.10-Working-With-Strings.ipynb) | [Contents](Index.ipynb) | [High-Performance Pandas: ``eval()`` and ``query()``](03.12-Performance-Eval-and-Query.ipynb) >"
"< [Vectorized String Operations](03.10-Working-With-Strings.ipynb) | [Contents](Index.ipynb) | [High-Performance Pandas: eval() and query()](03.12-Performance-Eval-and-Query.ipynb) >"
]
},
{
@ -1926,7 +1926,7 @@
"metadata": {},
"source": [
"<!--NAVIGATION-->\n",
"< [Vectorized String Operations](03.10-Working-With-Strings.ipynb) | [Contents](Index.ipynb) | [High-Performance Pandas: ``eval()`` and ``query()``](03.12-Performance-Eval-and-Query.ipynb) >"
"< [Vectorized String Operations](03.10-Working-With-Strings.ipynb) | [Contents](Index.ipynb) | [High-Performance Pandas: eval() and query()](03.12-Performance-Eval-and-Query.ipynb) >"
]
}
],

View File

@ -16,7 +16,7 @@
"metadata": {},
"source": [
"<!--NAVIGATION-->\n",
"< [High-Performance Pandas: ``eval()`` and ``query()``](03.12-Performance-Eval-and-Query.ipynb) | [Contents](Index.ipynb) | [Appendix: Figure Code](06.00-Figure-Code.ipynb) >"
"< [High-Performance Pandas: eval() and query()](03.12-Performance-Eval-and-Query.ipynb) | [Contents](Index.ipynb) | [Appendix: Figure Code](06.00-Figure-Code.ipynb) >"
]
},
{
@ -45,7 +45,7 @@
"metadata": {},
"source": [
"<!--NAVIGATION-->\n",
"< [High-Performance Pandas: ``eval()`` and ``query()``](03.12-Performance-Eval-and-Query.ipynb) | [Contents](Index.ipynb) | [Appendix: Figure Code](06.00-Figure-Code.ipynb) >"
"< [High-Performance Pandas: eval() and query()](03.12-Performance-Eval-and-Query.ipynb) | [Contents](Index.ipynb) | [Appendix: Figure Code](06.00-Figure-Code.ipynb) >"
]
}
],

View File

@ -1,5 +1,24 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<!--BOOK_INFORMATION-->\n",
"<img align=\"left\" style=\"padding-right:10px;\" src=\"figures/PDSH-cover-small.png\">\n",
"*This notebook contains an excerpt from the [Python Data Science Handbook](http://shop.oreilly.com/product/0636920034919.do) by Jake VanderPlas; the content is available [on GitHub](https://github.com/jakevdp/PythonDataScienceHandbook).*\n",
"\n",
"*The text is released under the [CC-BY-NC-ND license](https://creativecommons.org/licenses/by-nc-nd/3.0/us/legalcode), and code is released under the [MIT license](https://opensource.org/licenses/MIT). If you find this content useful, please support the work by [buying the book](http://shop.oreilly.com/product/0636920034919.do)!*"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<!--NAVIGATION-->\n",
"< [Further Resources](03.13-Further-Resources.ipynb) | [Contents](Index.ipynb) |"
]
},
{
"cell_type": "markdown",
"metadata": {},
@ -2464,6 +2483,14 @@
"\n",
"fig.savefig('figures/05.12-covariance-type.png')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<!--NAVIGATION-->\n",
"< [Further Resources](03.13-Further-Resources.ipynb) | [Contents](Index.ipynb) |"
]
}
],
"metadata": {

View File

@ -27,7 +27,7 @@
"\n",
"### [Preface](00.00-Preface.ipynb)\n",
"\n",
"### [IPython: Beyond Normal Python](01.00-IPython-Beyond-Normal-Python.ipynb)\n",
"### [1. IPython: Beyond Normal Python](01.00-IPython-Beyond-Normal-Python.ipynb)\n",
"- [Help and Documentation in IPython](01.01-Help-And-Documentation.ipynb)\n",
"- [Keyboard Shortcuts in the IPython Shell](01.02-Shell-Keyboard-Shortcuts.ipynb)\n",
"- [IPython Magic Commands](01.03-Magic-Commands.ipynb)\n",
@ -37,7 +37,7 @@
"- [Profiling and Timing Code](01.07-Timing-and-Profiling.ipynb)\n",
"- [More IPython Resources](01.08-More-IPython-Resources.ipynb)\n",
"\n",
"### [Introduction to NumPy](02.00-Introduction-to-NumPy.ipynb)\n",
"### [2. Introduction to NumPy](02.00-Introduction-to-NumPy.ipynb)\n",
"- [Understanding Data Types in Python](02.01-Understanding-Data-Types.ipynb)\n",
"- [The Basics of NumPy Arrays](02.02-The-Basics-Of-NumPy-Arrays.ipynb)\n",
"- [Computation on NumPy Arrays: Universal Functions](02.03-Computation-on-arrays-ufuncs.ipynb)\n",
@ -48,11 +48,24 @@
"- [Sorting Arrays](02.08-Sorting.ipynb)\n",
"- [Structured Data: NumPy's Structured Arrays](02.09-Structured-Data-NumPy.ipynb)\n",
"\n",
"### Data Manipulation with Pandas *(coming soon)*\n",
"### [3. Data Manipulation with Pandas](03.00-Introduction-to-Pandas.ipynb)\n",
"- [Introducing Pandas Objects](03.01-Introducing-Pandas-Objects.ipynb)\n",
"- [Data Indexing and Selection](03.02-Data-Indexing-and-Selection.ipynb)\n",
"- [Operating on Data in Pandas](03.03-Operations-in-Pandas.ipynb)\n",
"- [Handling Missing Data](03.04-Missing-Values.ipynb)\n",
"- [Hierarchical Indexing](03.05-Hierarchical-Indexing.ipynb)\n",
"- [Combining Datasets: Concat and Append](03.06-Concat-And-Append.ipynb)\n",
"- [Combining Datasets: Merge and Join](03.07-Merge-and-Join.ipynb)\n",
"- [Aggregation and Grouping](03.08-Aggregation-and-Grouping.ipynb)\n",
"- [Pivot Tables](03.09-Pivot-Tables.ipynb)\n",
"- [Vectorized String Operations](03.10-Working-With-Strings.ipynb)\n",
"- [Working with Time Series](03.11-Working-with-Time-Series.ipynb)\n",
"- [High-Performance Pandas: eval() and query()](03.12-Performance-Eval-and-Query.ipynb)\n",
"- [Further Resources](03.13-Further-Resources.ipynb)\n",
"\n",
"### Visualization with Matplotlib *(coming soon)*\n",
"### 4. Visualization with Matplotlib *(coming soon)*\n",
"\n",
"### Machine Learning *(coming soon)*\n",
"### 5. Machine Learning *(coming soon)*\n",
"\n",
"### [Appendix: Figure Code](06.00-Figure-Code.ipynb)"
]

View File

@ -35,7 +35,11 @@ def gen_contents(directory=None):
chapter, section, title = REG.match(nb).groups()
title = get_notebook_title(nb)
if section == '00':
yield '\n### [{0}]({1})'.format(title, nb_url)
if chapter in ['00', '06']:
yield '\n### [{0}]({1})'.format(title, nb_url)
else:
yield '\n### [{0}. {1}]({2})'.format(int(chapter),
title, nb_url)
else:
yield "- [{0}]({1})".format(title, nb_url)
@ -46,5 +50,5 @@ def print_contents(directory=None):
if __name__ == '__main__':
print_contents()
print(70 * '#')
print('\n', 70 * '#', '\n')
print_contents('http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/')