Skip to content

Commit 343108c

Browse files
authored
Merge pull request #14 from aeturrell/polars-letsplot-2e
letsplot and finished book
2 parents 266d533 + fdb0d06 commit 343108c

16 files changed

Lines changed: 3731 additions & 869 deletions

_toc.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Table of contents
2-
# Learn more at https://jupyterbook.org/customize/toc.html
32

43
format: jb-book
54
root: welcome
65
parts:
76
- caption: Introduction
87
chapters:
98
- file: introduction
10-
- caption: Getting Started
9+
- file: prerequisites
10+
- caption: Quick Start
1111
numbered: true
1212
chapters:
1313
- file: whole-game
@@ -23,26 +23,28 @@ parts:
2323
- caption: Visualise
2424
numbered: true
2525
chapters:
26+
- file: visualise
27+
- file: vis-layers
2628
- file: exploratory-data-analysis
2729
- file: communicate-plots
2830
- caption: Transform
2931
numbered: true
3032
chapters:
31-
- file: joins
3233
- file: boolean-data
3334
- file: numbers
3435
- file: strings
3536
- file: regex
3637
- file: categorical-data
3738
- file: dates-and-times
3839
- file: missing-values
40+
- file: joins
3941
- caption: Import
4042
numbered: true
4143
chapters:
4244
- file: spreadsheets
43-
- file: webscraping-and-apis
44-
- file: rectangling
4545
- file: databases
46+
- file: rectangling
47+
- file: webscraping-and-apis
4648
- caption: Programme
4749
numbered: true
4850
chapters:

categorical-data.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,18 +223,17 @@
223223
"source": [
224224
"### Renaming Categories\n",
225225
"\n",
226-
"Renaming categories is done by assigning new values to the `.cat.categories` property or by using the `rename_categories()` method (which works with a list or a dictionary)."
226+
"Renaming categories is done via the `rename_categories()` method (which works with a list or a dictionary)."
227227
]
228228
},
229229
{
230230
"cell_type": "code",
231231
"execution_count": null,
232-
"id": "aedcf10f",
232+
"id": "097171b8",
233233
"metadata": {},
234234
"outputs": [],
235235
"source": [
236-
"df[\"cat_type\"].cat.categories = [\"alpha\", \"beta\", \"gamma\"]\n",
237-
"df"
236+
"df[\"cat_type\"] = df[\"cat_type\"].cat.rename_categories([\"alpha\", \"beta\", \"gamma\"])"
238237
]
239238
},
240239
{
@@ -380,7 +379,7 @@
380379
"name": "python",
381380
"nbconvert_exporter": "python",
382381
"pygments_lexer": "ipython3",
383-
"version": "3.9.12"
382+
"version": "3.10.12"
384383
},
385384
"toc-showtags": true
386385
},

0 commit comments

Comments
 (0)