diff --git a/README.md b/README.md index 773612bde..8c52db42e 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/notebooks/02.09-Structured-Data-NumPy.ipynb b/notebooks/02.09-Structured-Data-NumPy.ipynb index c9d1a6abb..1cac47f7e 100644 --- a/notebooks/02.09-Structured-Data-NumPy.ipynb +++ b/notebooks/02.09-Structured-Data-NumPy.ipynb @@ -16,7 +16,7 @@ "metadata": {}, "source": [ "\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": [ "\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) >" ] } ], diff --git a/notebooks/03.05-Hierarchical-Indexing.ipynb b/notebooks/03.05-Hierarchical-Indexing.ipynb index 870242def..b54ff1102 100644 --- a/notebooks/03.05-Hierarchical-Indexing.ipynb +++ b/notebooks/03.05-Hierarchical-Indexing.ipynb @@ -16,7 +16,7 @@ "metadata": {}, "source": [ "\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": [ "\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) >" ] } ], diff --git a/notebooks/03.07-Merge-and-Join.ipynb b/notebooks/03.07-Merge-and-Join.ipynb index 8815c68ef..3b4b513c6 100644 --- a/notebooks/03.07-Merge-and-Join.ipynb +++ b/notebooks/03.07-Merge-and-Join.ipynb @@ -16,7 +16,7 @@ "metadata": {}, "source": [ "\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": [ "\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) >" ] } ], diff --git a/notebooks/03.11-Working-with-Time-Series.ipynb b/notebooks/03.11-Working-with-Time-Series.ipynb index d1c3fb1af..02d186b13 100644 --- a/notebooks/03.11-Working-with-Time-Series.ipynb +++ b/notebooks/03.11-Working-with-Time-Series.ipynb @@ -16,7 +16,7 @@ "metadata": {}, "source": [ "\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": [ "\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) >" ] } ], diff --git a/notebooks/03.13-Further-Resources.ipynb b/notebooks/03.13-Further-Resources.ipynb index 6a512eeed..0332331dc 100644 --- a/notebooks/03.13-Further-Resources.ipynb +++ b/notebooks/03.13-Further-Resources.ipynb @@ -16,7 +16,7 @@ "metadata": {}, "source": [ "\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": [ "\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) >" ] } ], diff --git a/notebooks/06.00-Figure-Code.ipynb b/notebooks/06.00-Figure-Code.ipynb index ffa3bac1e..59e562c78 100644 --- a/notebooks/06.00-Figure-Code.ipynb +++ b/notebooks/06.00-Figure-Code.ipynb @@ -1,5 +1,24 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "\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": [ + "\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": [ + "\n", + "< [Further Resources](03.13-Further-Resources.ipynb) | [Contents](Index.ipynb) |" + ] } ], "metadata": { diff --git a/notebooks/Index.ipynb b/notebooks/Index.ipynb index a6d36fbab..9630b5ba9 100644 --- a/notebooks/Index.ipynb +++ b/notebooks/Index.ipynb @@ -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)" ] diff --git a/tools/generate_contents.py b/tools/generate_contents.py index 1f532aa54..705677fa5 100644 --- a/tools/generate_contents.py +++ b/tools/generate_contents.py @@ -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/')