From d603987a20d574b19857168b1155d9f07f212cf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Geron?= Date: Wed, 7 Apr 2021 08:53:35 +1200 Subject: [PATCH] substract=>subtract, fixes https://github.com/ageron/handson-ml/issues/623 --- math_linear_algebra.ipynb | 2 +- tools_pandas.ipynb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/math_linear_algebra.ipynb b/math_linear_algebra.ipynb index 07497b9..a275a28 100644 --- a/math_linear_algebra.ipynb +++ b/math_linear_algebra.ipynb @@ -473,7 +473,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Finally, substracting a vector is like adding the opposite vector." + "Finally, subtracting a vector is like adding the opposite vector." ] }, { diff --git a/tools_pandas.ipynb b/tools_pandas.ipynb index 2e93943..4c7ac3c 100644 --- a/tools_pandas.ipynb +++ b/tools_pandas.ipynb @@ -1841,7 +1841,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "If you add a `Series` object to a `DataFrame` (or execute any other binary operation), pandas attempts to broadcast the operation to all *rows* in the `DataFrame`. This only works if the `Series` has the same size as the `DataFrame`s rows. For example, let's substract the `mean` of the `DataFrame` (a `Series` object) from the `DataFrame`:" + "If you add a `Series` object to a `DataFrame` (or execute any other binary operation), pandas attempts to broadcast the operation to all *rows* in the `DataFrame`. This only works if the `Series` has the same size as the `DataFrame`s rows. For example, let's subtract the `mean` of the `DataFrame` (a `Series` object) from the `DataFrame`:" ] }, { @@ -1857,7 +1857,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We substracted `7.75` from all September grades, `8.75` from October grades and `7.50` from November grades. It is equivalent to substracting this `DataFrame`:" + "We subtracted `7.75` from all September grades, `8.75` from October grades and `7.50` from November grades. It is equivalent to subtracting this `DataFrame`:" ] }, { @@ -1873,7 +1873,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "If you want to substract the global mean from every grade, here is one way to do it:" + "If you want to subtract the global mean from every grade, here is one way to do it:" ] }, { @@ -1884,7 +1884,7 @@ }, "outputs": [], "source": [ - "grades - grades.values.mean() # substracts the global mean (8.00) from all grades" + "grades - grades.values.mean() # subtracts the global mean (8.00) from all grades" ] }, {