Skip to content

Commit a63d36b

Browse files
committed
Merge pull request #9863 from mortada/cat_docs
DOC/CLN: fixed several typos in categorical.rst
2 parents d27e0a6 + 7252c33 commit a63d36b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

doc/source/categorical.rst

+11-11
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ Categorical Data
2323
.. versionadded:: 0.15
2424

2525
.. note::
26-
While there was in `pandas.Categorical` in earlier versions, the ability to use
26+
While there was `pandas.Categorical` in earlier versions, the ability to use
2727
categorical data in `Series` and `DataFrame` is new.
2828

2929

30-
This is a introduction to pandas categorical data type, including a short comparison
30+
This is an introduction to pandas categorical data type, including a short comparison
3131
with R's ``factor``.
3232

3333
`Categoricals` are a pandas data type, which correspond to categorical variables in
@@ -276,7 +276,7 @@ Sorting and Order
276276

277277
.. warning::
278278

279-
The default for construction has change in v0.16.0 to ``ordered=False``, from the prior implicit ``ordered=True``
279+
The default for construction has changed in v0.16.0 to ``ordered=False``, from the prior implicit ``ordered=True``
280280

281281
If categorical data is ordered (``s.cat.ordered == True``), then the order of the categories has a
282282
meaning and certain operations are possible. If the categorical is unordered, ``.min()/.max()`` will raise a `TypeError`.
@@ -347,15 +347,15 @@ Multi Column Sorting
347347
~~~~~~~~~~~~~~~~~~~~
348348

349349
A categorical dtyped column will partcipate in a multi-column sort in a similar manner to other columns.
350-
The ordering of the categorical is determined by the ``categories`` of that columns.
350+
The ordering of the categorical is determined by the ``categories`` of that column.
351351

352352
.. ipython:: python
353353
354-
dfs = DataFrame({'A' : Categorical(list('bbeebbaa'),categories=['e','a','b'],ordered=True),
354+
dfs = DataFrame({'A' : Categorical(list('bbeebbaa'), categories=['e','a','b'], ordered=True),
355355
'B' : [1,2,1,2,2,1,2,1] })
356-
dfs.sort(['A','B'])
356+
dfs.sort(['A', 'B'])
357357
358-
Reordering the ``categories``, changes a future sort.
358+
Reordering the ``categories`` changes a future sort.
359359

360360
.. ipython:: python
361361
@@ -380,7 +380,7 @@ categories or a categorical with any list-like object, will raise a TypeError.
380380

381381
Any "non-equality" comparisons of categorical data with a `Series`, `np.array`, `list` or
382382
categorical data with different categories or ordering will raise an `TypeError` because custom
383-
categories ordering could be interpreted in two ways: one with taking in account the
383+
categories ordering could be interpreted in two ways: one with taking into account the
384384
ordering and one without.
385385

386386
.. ipython:: python
@@ -471,7 +471,7 @@ Data munging
471471
------------
472472

473473
The optimized pandas data access methods ``.loc``, ``.iloc``, ``.ix`` ``.at``, and ``.iat``,
474-
work as normal, the only difference is the return type (for getting) and
474+
work as normal. The only difference is the return type (for getting) and
475475
that only values already in `categories` can be assigned.
476476

477477
Getting
@@ -707,8 +707,8 @@ an ``object`` dtype is a constant times the length of the data.
707707
708708
.. note::
709709

710-
If the number of categories approaches the length of the data, the ``Categorical`` will use nearly (or more) memory than an
711-
equivalent ``object`` dtype representation.
710+
If the number of categories approaches the length of the data, the ``Categorical`` will use nearly the same or
711+
more memory than an equivalent ``object`` dtype representation.
712712

713713
.. ipython:: python
714714

0 commit comments

Comments
 (0)