Skip to content

Commit 39338e2

Browse files
authored
DOC: Fix typos and broken formatting (#37226)
1 parent dd25f1a commit 39338e2

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

doc/source/getting_started/intro_tutorials/10_text_data.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ How to manipulate textual data?
6666
<ul class="task-bullet">
6767
<li>
6868

69-
Make all name characters lowercase
69+
Make all name characters lowercase.
7070

7171
.. ipython:: python
7272
7373
titanic["Name"].str.lower()
7474
7575
To make each of the strings in the ``Name`` column lowercase, select the ``Name`` column
76-
(see :ref:`tutorial on selection of data <10min_tut_03_subset>`), add the ``str`` accessor and
77-
apply the ``lower`` method. As such, each of the strings is converted element wise.
76+
(see the :ref:`tutorial on selection of data <10min_tut_03_subset>`), add the ``str`` accessor and
77+
apply the ``lower`` method. As such, each of the strings is converted element-wise.
7878

7979
.. raw:: html
8080

@@ -86,15 +86,15 @@ having a ``dt`` accessor, a number of
8686
specialized string methods are available when using the ``str``
8787
accessor. These methods have in general matching names with the
8888
equivalent built-in string methods for single elements, but are applied
89-
element-wise (remember :ref:`element wise calculations <10min_tut_05_columns>`?)
89+
element-wise (remember :ref:`element-wise calculations <10min_tut_05_columns>`?)
9090
on each of the values of the columns.
9191

9292
.. raw:: html
9393

9494
<ul class="task-bullet">
9595
<li>
9696

97-
Create a new column ``Surname`` that contains the surname of the Passengers by extracting the part before the comma.
97+
Create a new column ``Surname`` that contains the surname of the passengers by extracting the part before the comma.
9898

9999
.. ipython:: python
100100
@@ -135,7 +135,7 @@ More information on extracting parts of strings is available in the user guide s
135135
<ul class="task-bullet">
136136
<li>
137137

138-
Extract the passenger data about the Countesses on board of the Titanic.
138+
Extract the passenger data about the countesses on board of the Titanic.
139139

140140
.. ipython:: python
141141
@@ -145,15 +145,15 @@ Extract the passenger data about the Countesses on board of the Titanic.
145145
146146
titanic[titanic["Name"].str.contains("Countess")]
147147
148-
(*Interested in her story? See *\ `Wikipedia <https://en.wikipedia.org/wiki/No%C3%ABl_Leslie,_Countess_of_Rothes>`__\ *!*)
148+
(*Interested in her story? See* `Wikipedia <https://en.wikipedia.org/wiki/No%C3%ABl_Leslie,_Countess_of_Rothes>`__\ *!*)
149149

150150
The string method :meth:`Series.str.contains` checks for each of the values in the
151151
column ``Name`` if the string contains the word ``Countess`` and returns
152-
for each of the values ``True`` (``Countess`` is part of the name) of
152+
for each of the values ``True`` (``Countess`` is part of the name) or
153153
``False`` (``Countess`` is not part of the name). This output can be used
154154
to subselect the data using conditional (boolean) indexing introduced in
155155
the :ref:`subsetting of data tutorial <10min_tut_03_subset>`. As there was
156-
only one Countess on the Titanic, we get one row as a result.
156+
only one countess on the Titanic, we get one row as a result.
157157

158158
.. raw:: html
159159

@@ -220,7 +220,7 @@ we can do a selection using the ``loc`` operator, introduced in the
220220
<ul class="task-bullet">
221221
<li>
222222

223-
In the "Sex" column, replace values of "male" by "M" and values of "female" by "F"
223+
In the "Sex" column, replace values of "male" by "M" and values of "female" by "F".
224224

225225
.. ipython:: python
226226
@@ -256,7 +256,7 @@ a ``dictionary`` to define the mapping ``{from : to}``.
256256
<h4>REMEMBER</h4>
257257

258258
- String methods are available using the ``str`` accessor.
259-
- String methods work element wise and can be used for conditional
259+
- String methods work element-wise and can be used for conditional
260260
indexing.
261261
- The ``replace`` method is a convenient method to convert values
262262
according to a given dictionary.

0 commit comments

Comments
 (0)