Skip to content

Commit

Permalink
Small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
SamLau95 committed May 25, 2023
1 parent de30f60 commit 00701ef
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 2,430 deletions.
4 changes: 2 additions & 2 deletions content/ch/01/lifecycle_intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -71,7 +71,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.4"
"version": "3.10.11"
}
},
"nbformat": 4,
Expand Down
Binary file added content/ch/13/figures/sotu_pca.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 44 additions & 6 deletions content/ch/13/text_regex.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
Expand Down Expand Up @@ -93,6 +94,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -102,6 +104,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
Expand All @@ -112,6 +115,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -135,6 +139,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -148,6 +153,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -163,6 +169,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
Expand Down Expand Up @@ -200,6 +207,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab": {
Expand Down Expand Up @@ -259,13 +267,15 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"The idea of moving through the string one character at a time still remains the core notion, but now there's a bit more flexibility in which literal is considered a match."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
Expand All @@ -278,6 +288,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
Expand All @@ -292,6 +303,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -304,6 +316,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -334,6 +347,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -390,6 +404,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -448,6 +463,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -456,6 +472,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
Expand Down Expand Up @@ -525,6 +542,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -552,6 +570,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
Expand All @@ -563,6 +582,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
Expand All @@ -583,6 +603,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
Expand All @@ -604,6 +625,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
Expand Down Expand Up @@ -638,6 +660,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -665,6 +688,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -675,6 +699,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -731,6 +756,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -784,6 +810,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -795,6 +822,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
Expand All @@ -810,6 +838,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
Expand All @@ -834,6 +863,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
Expand Down Expand Up @@ -867,6 +897,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
Expand All @@ -892,6 +923,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -907,6 +939,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -925,6 +958,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -939,23 +973,26 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
":::{table} Regular Expressions in Pandas\n",
":name: regex-pandas\n",
"\n",
"| Method |Return value |\n",
"| ----------------------------- | ------------------ |\n",
"| `str.contains(pattern)` | Series of booleans indicating whether the `pattern` is found |\n",
"| `str.findall(pattern)` | list of all matches of `pattern` |\n",
"| `str.replace(pattern, replacement)` | Series with all matching occurrences of `pattern` replaced by `replacement` |\n",
"| `str.split(pattern)` | Series of lists of strings around given `pattern` |\n",
"| Method | Return value |\n",
"| ----------------------------------------------- | --------------------------------------------------------------------------- |\n",
"| `str.contains(pattern, regex=True)` | Series of booleans indicating whether the `pattern` is found |\n",
"| `str.findall(pattern, regex=True)` | list of all matches of `pattern` |\n",
"| `str.replace(pattern, replacement, regex=True)` | Series with all matching occurrences of `pattern` replaced by `replacement` |\n",
"| `str.split(pattern, regex=True)` | Series of lists of strings around given `pattern` |\n",
"\n",
"\n",
":::"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -969,6 +1006,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down

0 comments on commit 00701ef

Please sign in to comment.