Skip to content

Commit 9ed67d7

Browse files
committed
Update headers, contents, and navigation links to add Chapter 3
1 parent d3a232e commit 9ed67d7

9 files changed

+79
-22
lines changed

README.md

+18-5
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,35 @@ I am currently editing these notebooks, and will post them as I make my way thro
3838
- [Sorting Arrays](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/02.08-Sorting.ipynb)
3939
- [Structured Data: NumPy's Structured Arrays](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/02.09-Structured-Data-NumPy.ipynb)
4040

41-
#### 3. Data Manipulation with Pandas *(coming soon)*
41+
### [3. Data Manipulation with Pandas](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.00-Introduction-to-Pandas.ipynb)
42+
- [Introducing Pandas Objects](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.01-Introducing-Pandas-Objects.ipynb)
43+
- [Data Indexing and Selection](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.02-Data-Indexing-and-Selection.ipynb)
44+
- [Operating on Data in Pandas](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.03-Operations-in-Pandas.ipynb)
45+
- [Handling Missing Data](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.04-Missing-Values.ipynb)
46+
- [Hierarchical Indexing](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.05-Hierarchical-Indexing.ipynb)
47+
- [Combining Datasets: Concat and Append](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.06-Concat-And-Append.ipynb)
48+
- [Combining Datasets: Merge and Join](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.07-Merge-and-Join.ipynb)
49+
- [Aggregation and Grouping](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.08-Aggregation-and-Grouping.ipynb)
50+
- [Pivot Tables](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.09-Pivot-Tables.ipynb)
51+
- [Vectorized String Operations](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.10-Working-With-Strings.ipynb)
52+
- [Working with Time Series](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.11-Working-with-Time-Series.ipynb)
53+
- [High-Performance Pandas: eval() and query()](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.12-Performance-Eval-and-Query.ipynb)
54+
- [Further Resources](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/03.13-Further-Resources.ipynb)
4255

4356
#### 4. Visualization with Matplotlib *(coming soon)*
4457

4558
#### 5. Machine Learning *(coming soon)*
4659

47-
### [Appendix: Figure Code](notebooks/06.00-Figure-Code.ipynb)
60+
### [Appendix: Figure Code](http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/06.00-Figure-Code.ipynb)
4861

4962

5063
## Code Listings
5164

5265
The notebooks above are still being edited. In the meantime, you can see all
53-
the code from the book in [code_listings](code_listings).
66+
the code from an earlier draft of the book in [code_listings](code_listings).
5467
The code is in IPython notebooks, organized by book chapter and section.
55-
All code from this book was tested with Python 3.4-3.5, though it should be
56-
near 100% compatible with Python 2.7 as well.
68+
All code from this book was tested with Python 3.4-3.5, though most of it
69+
is compatible with Python 2.7 as well.
5770

5871

5972
## Figure Appendix

notebooks/02.09-Structured-Data-NumPy.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"metadata": {},
1717
"source": [
1818
"<!--NAVIGATION-->\n",
19-
"< [Sorting Arrays](02.08-Sorting.ipynb) | [Contents](Index.ipynb) |"
19+
"< [Sorting Arrays](02.08-Sorting.ipynb) | [Contents](Index.ipynb) | [Data Manipulation with Pandas](03.00-Introduction-to-Pandas.ipynb) >"
2020
]
2121
},
2222
{
@@ -569,7 +569,7 @@
569569
"metadata": {},
570570
"source": [
571571
"<!--NAVIGATION-->\n",
572-
"< [Sorting Arrays](02.08-Sorting.ipynb) | [Contents](Index.ipynb) |"
572+
"< [Sorting Arrays](02.08-Sorting.ipynb) | [Contents](Index.ipynb) | [Data Manipulation with Pandas](03.00-Introduction-to-Pandas.ipynb) >"
573573
]
574574
}
575575
],

notebooks/03.05-Hierarchical-Indexing.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"metadata": {},
1717
"source": [
1818
"<!--NAVIGATION-->\n",
19-
"< [Handling Missing Data](03.04-Missing-Values.ipynb) | [Contents](Index.ipynb) | [Combining Datasets: Concat & Append](03.06-Concat-And-Append.ipynb) >"
19+
"< [Handling Missing Data](03.04-Missing-Values.ipynb) | [Contents](Index.ipynb) | [Combining Datasets: Concat and Append](03.06-Concat-And-Append.ipynb) >"
2020
]
2121
},
2222
{
@@ -2489,7 +2489,7 @@
24892489
"metadata": {},
24902490
"source": [
24912491
"<!--NAVIGATION-->\n",
2492-
"< [Handling Missing Data](03.04-Missing-Values.ipynb) | [Contents](Index.ipynb) | [Combining Datasets: Concat & Append](03.06-Concat-And-Append.ipynb) >"
2492+
"< [Handling Missing Data](03.04-Missing-Values.ipynb) | [Contents](Index.ipynb) | [Combining Datasets: Concat and Append](03.06-Concat-And-Append.ipynb) >"
24932493
]
24942494
}
24952495
],

notebooks/03.07-Merge-and-Join.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"metadata": {},
1717
"source": [
1818
"<!--NAVIGATION-->\n",
19-
"< [Combining Datasets: Concat & Append](03.06-Concat-And-Append.ipynb) | [Contents](Index.ipynb) | [Aggregation and Grouping](03.08-Aggregation-and-Grouping.ipynb) >"
19+
"< [Combining Datasets: Concat and Append](03.06-Concat-And-Append.ipynb) | [Contents](Index.ipynb) | [Aggregation and Grouping](03.08-Aggregation-and-Grouping.ipynb) >"
2020
]
2121
},
2222
{
@@ -3539,7 +3539,7 @@
35393539
"metadata": {},
35403540
"source": [
35413541
"<!--NAVIGATION-->\n",
3542-
"< [Combining Datasets: Concat & Append](03.06-Concat-And-Append.ipynb) | [Contents](Index.ipynb) | [Aggregation and Grouping](03.08-Aggregation-and-Grouping.ipynb) >"
3542+
"< [Combining Datasets: Concat and Append](03.06-Concat-And-Append.ipynb) | [Contents](Index.ipynb) | [Aggregation and Grouping](03.08-Aggregation-and-Grouping.ipynb) >"
35433543
]
35443544
}
35453545
],

notebooks/03.11-Working-with-Time-Series.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"metadata": {},
1717
"source": [
1818
"<!--NAVIGATION-->\n",
19-
"< [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) >"
19+
"< [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) >"
2020
]
2121
},
2222
{
@@ -1926,7 +1926,7 @@
19261926
"metadata": {},
19271927
"source": [
19281928
"<!--NAVIGATION-->\n",
1929-
"< [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) >"
1929+
"< [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) >"
19301930
]
19311931
}
19321932
],

notebooks/03.13-Further-Resources.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"metadata": {},
1717
"source": [
1818
"<!--NAVIGATION-->\n",
19-
"< [High-Performance Pandas: ``eval()`` and ``query()``](03.12-Performance-Eval-and-Query.ipynb) | [Contents](Index.ipynb) | [Appendix: Figure Code](06.00-Figure-Code.ipynb) >"
19+
"< [High-Performance Pandas: eval() and query()](03.12-Performance-Eval-and-Query.ipynb) | [Contents](Index.ipynb) | [Appendix: Figure Code](06.00-Figure-Code.ipynb) >"
2020
]
2121
},
2222
{
@@ -45,7 +45,7 @@
4545
"metadata": {},
4646
"source": [
4747
"<!--NAVIGATION-->\n",
48-
"< [High-Performance Pandas: ``eval()`` and ``query()``](03.12-Performance-Eval-and-Query.ipynb) | [Contents](Index.ipynb) | [Appendix: Figure Code](06.00-Figure-Code.ipynb) >"
48+
"< [High-Performance Pandas: eval() and query()](03.12-Performance-Eval-and-Query.ipynb) | [Contents](Index.ipynb) | [Appendix: Figure Code](06.00-Figure-Code.ipynb) >"
4949
]
5050
}
5151
],

notebooks/06.00-Figure-Code.ipynb

+27
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"<!--BOOK_INFORMATION-->\n",
8+
"<img align=\"left\" style=\"padding-right:10px;\" src=\"figures/PDSH-cover-small.png\">\n",
9+
"*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",
10+
"\n",
11+
"*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)!*"
12+
]
13+
},
14+
{
15+
"cell_type": "markdown",
16+
"metadata": {},
17+
"source": [
18+
"<!--NAVIGATION-->\n",
19+
"< [Further Resources](03.13-Further-Resources.ipynb) | [Contents](Index.ipynb) |"
20+
]
21+
},
322
{
423
"cell_type": "markdown",
524
"metadata": {},
@@ -2464,6 +2483,14 @@
24642483
"\n",
24652484
"fig.savefig('figures/05.12-covariance-type.png')"
24662485
]
2486+
},
2487+
{
2488+
"cell_type": "markdown",
2489+
"metadata": {},
2490+
"source": [
2491+
"<!--NAVIGATION-->\n",
2492+
"< [Further Resources](03.13-Further-Resources.ipynb) | [Contents](Index.ipynb) |"
2493+
]
24672494
}
24682495
],
24692496
"metadata": {

notebooks/Index.ipynb

+18-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"\n",
2828
"### [Preface](00.00-Preface.ipynb)\n",
2929
"\n",
30-
"### [IPython: Beyond Normal Python](01.00-IPython-Beyond-Normal-Python.ipynb)\n",
30+
"### [1. IPython: Beyond Normal Python](01.00-IPython-Beyond-Normal-Python.ipynb)\n",
3131
"- [Help and Documentation in IPython](01.01-Help-And-Documentation.ipynb)\n",
3232
"- [Keyboard Shortcuts in the IPython Shell](01.02-Shell-Keyboard-Shortcuts.ipynb)\n",
3333
"- [IPython Magic Commands](01.03-Magic-Commands.ipynb)\n",
@@ -37,7 +37,7 @@
3737
"- [Profiling and Timing Code](01.07-Timing-and-Profiling.ipynb)\n",
3838
"- [More IPython Resources](01.08-More-IPython-Resources.ipynb)\n",
3939
"\n",
40-
"### [Introduction to NumPy](02.00-Introduction-to-NumPy.ipynb)\n",
40+
"### [2. Introduction to NumPy](02.00-Introduction-to-NumPy.ipynb)\n",
4141
"- [Understanding Data Types in Python](02.01-Understanding-Data-Types.ipynb)\n",
4242
"- [The Basics of NumPy Arrays](02.02-The-Basics-Of-NumPy-Arrays.ipynb)\n",
4343
"- [Computation on NumPy Arrays: Universal Functions](02.03-Computation-on-arrays-ufuncs.ipynb)\n",
@@ -48,11 +48,24 @@
4848
"- [Sorting Arrays](02.08-Sorting.ipynb)\n",
4949
"- [Structured Data: NumPy's Structured Arrays](02.09-Structured-Data-NumPy.ipynb)\n",
5050
"\n",
51-
"### Data Manipulation with Pandas *(coming soon)*\n",
51+
"### [3. Data Manipulation with Pandas](03.00-Introduction-to-Pandas.ipynb)\n",
52+
"- [Introducing Pandas Objects](03.01-Introducing-Pandas-Objects.ipynb)\n",
53+
"- [Data Indexing and Selection](03.02-Data-Indexing-and-Selection.ipynb)\n",
54+
"- [Operating on Data in Pandas](03.03-Operations-in-Pandas.ipynb)\n",
55+
"- [Handling Missing Data](03.04-Missing-Values.ipynb)\n",
56+
"- [Hierarchical Indexing](03.05-Hierarchical-Indexing.ipynb)\n",
57+
"- [Combining Datasets: Concat and Append](03.06-Concat-And-Append.ipynb)\n",
58+
"- [Combining Datasets: Merge and Join](03.07-Merge-and-Join.ipynb)\n",
59+
"- [Aggregation and Grouping](03.08-Aggregation-and-Grouping.ipynb)\n",
60+
"- [Pivot Tables](03.09-Pivot-Tables.ipynb)\n",
61+
"- [Vectorized String Operations](03.10-Working-With-Strings.ipynb)\n",
62+
"- [Working with Time Series](03.11-Working-with-Time-Series.ipynb)\n",
63+
"- [High-Performance Pandas: eval() and query()](03.12-Performance-Eval-and-Query.ipynb)\n",
64+
"- [Further Resources](03.13-Further-Resources.ipynb)\n",
5265
"\n",
53-
"### Visualization with Matplotlib *(coming soon)*\n",
66+
"### 4. Visualization with Matplotlib *(coming soon)*\n",
5467
"\n",
55-
"### Machine Learning *(coming soon)*\n",
68+
"### 5. Machine Learning *(coming soon)*\n",
5669
"\n",
5770
"### [Appendix: Figure Code](06.00-Figure-Code.ipynb)"
5871
]

tools/generate_contents.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ def gen_contents(directory=None):
3535
chapter, section, title = REG.match(nb).groups()
3636
title = get_notebook_title(nb)
3737
if section == '00':
38-
yield '\n### [{0}]({1})'.format(title, nb_url)
38+
if chapter in ['00', '06']:
39+
yield '\n### [{0}]({1})'.format(title, nb_url)
40+
else:
41+
yield '\n### [{0}. {1}]({2})'.format(int(chapter),
42+
title, nb_url)
3943
else:
4044
yield "- [{0}]({1})".format(title, nb_url)
4145

@@ -46,5 +50,5 @@ def print_contents(directory=None):
4650

4751
if __name__ == '__main__':
4852
print_contents()
49-
print(70 * '#')
53+
print('\n', 70 * '#', '\n')
5054
print_contents('http://nbviewer.jupyter.org/github/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/')

0 commit comments

Comments
 (0)