Skip to content

Commit d7b0da8

Browse files
authored
Merge pull request #36 from fangohr/review-pandas-section
Review pandas section
2 parents 7bf9f05 + 48cb5dc commit d7b0da8

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ stock.csv
2222
.venv
2323
.venv/
2424
book/_build
25+
.DS_Store

book/17-pandas.ipynb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
"cell_type": "markdown",
125125
"metadata": {},
126126
"source": [
127-
"In a way, the keys of the dictionary contain the stock labels and the values contain the actual values:"
127+
"The keys of the dictionary contain the stock labels and the values contain the actual values:"
128128
]
129129
},
130130
{
@@ -189,7 +189,7 @@
189189
"cell_type": "markdown",
190190
"metadata": {},
191191
"source": [
192-
"The Pandas Series object address the requriments above. It is similar to a dictionary, but with improvements for the given problem:\n",
192+
"The Pandas Series object address the requirements above. It is similar to a dictionary, but with improvements for the given problem:\n",
193193
"\n",
194194
"* the order of the items is maintained\n",
195195
"* the values have to have the same type (higher execution performance)\n",
@@ -342,11 +342,11 @@
342342
"outputs": [],
343343
"source": [
344344
"%matplotlib inline\n",
345-
"# settings for jupyter book: svg for html version, high-resolution png for pdf\n",
346-
"from IPython.display import set_matplotlib_formats\n",
347-
"set_matplotlib_formats('svg', 'png')\n",
348-
"import matplotlib as mpl\n",
349-
"mpl.rcParams['figure.dpi'] = 400"
345+
"# settings for Jupyter book: svg for html version, high-resolution png for pdf\n",
346+
"import matplotlib\n",
347+
"import matplotlib_inline\n",
348+
"matplotlib_inline.backend_inline.set_matplotlib_formats('svg', 'png')\n",
349+
"matplotlib.rcParams['figure.dpi'] = 400"
350350
]
351351
},
352352
{
@@ -607,7 +607,7 @@
607607
"source": [
608608
"## Plotting data\n",
609609
"\n",
610-
"Commonly used plots are easily accessible via the `plot()` method of the Series object. We have seen a bar plot above already. The `Series.plot()` method accepts an argument `kind` such as `kind=\"bar\"`, but there is an equivalent method `Series.plot.bar()` avaialble.\n",
610+
"Commonly used plots are easily accessible via the `plot()` method of the Series object. We have seen a bar plot above already. The `Series.plot()` method accepts an argument `kind` such as `kind=\"bar\"`, but there is an equivalent method `Series.plot.bar()` available.\n",
611611
"\n",
612612
"Further examples:"
613613
]
@@ -656,7 +656,7 @@
656656
"cell_type": "markdown",
657657
"metadata": {},
658658
"source": [
659-
"We can also fetch the data from the series and drive the plotting \"manually\" ourselves:"
659+
"We can also retrieve the data from the series and drive the plotting \"manually\" ourselves:"
660660
]
661661
},
662662
{
@@ -667,8 +667,8 @@
667667
"source": [
668668
"import matplotlib.pyplot as plt\n",
669669
"\n",
670-
"names = list(stock.index)\n",
671-
"values = list(stock.values)\n",
670+
"names = list(stock.index) # conversion to list not necessary \n",
671+
"values = list(stock.values) # conversion to list not necessary\n",
672672
"\n",
673673
"fig, ax = plt.subplots(1, 1, figsize=(9, 3))\n",
674674
"ax.bar(names, values)\n",
@@ -1788,7 +1788,7 @@
17881788
"metadata": {
17891789
"anaconda-cloud": {},
17901790
"kernelspec": {
1791-
"display_name": "Python 3",
1791+
"display_name": "Python 3 (ipykernel)",
17921792
"language": "python",
17931793
"name": "python3"
17941794
},
@@ -1802,9 +1802,9 @@
18021802
"name": "python",
18031803
"nbconvert_exporter": "python",
18041804
"pygments_lexer": "ipython3",
1805-
"version": "3.8.6-final"
1805+
"version": "3.9.13"
18061806
}
18071807
},
18081808
"nbformat": 4,
18091809
"nbformat_minor": 2
1810-
}
1810+
}

todo.org

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
* TODO
22
- [X] building natively on OSX works (make html, make pdf)
33
- [X] Binder link is included
4-
- [ ] nbval shows some failures
5-
- [ ] building through docker fails for pdf
4+
- [X] nbval shows some failures
5+
- [X] building through docker fails for pdf
66
- [ ] check github actions
77
- [ ] make pdf available?
88
- [ ] JupyterLite version
9-
- [ ] check CI
9+
- [X] check CI
1010
- [ ] run black over notebooks
11-
- [ ] review content
11+
- [ ] run spell checker over notebooks
12+
- see https://stackoverflow.com/questions/39324039/highlight-typos-in-the-jupyter-notebook-markdown
13+
- [X] review content
14+
- [X] pandas
1215

0 commit comments

Comments
 (0)