You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/user_guide/categorical.rst
-16Lines changed: 0 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -240,8 +240,6 @@ expects a ``dtype``. For example :func:`pandas.read_csv`,
240
240
array. In other words, ``dtype='category'`` is equivalent to
241
241
``dtype=CategoricalDtype()``.
242
242
243
-
.. _categorical.equalitysemantics:
244
-
245
243
Equality semantics
246
244
~~~~~~~~~~~~~~~~~~
247
245
@@ -1180,17 +1178,3 @@ Use ``copy=True`` to prevent such a behaviour or simply don't reuse ``Categorica
1180
1178
This also happens in some cases when you supply a NumPy array instead of a ``Categorical``:
1181
1179
using an int array (e.g. ``np.array([1,2,3,4])``) will exhibit the same behavior, while using
1182
1180
a string array (e.g. ``np.array(["a","b","c","a"])``) will not.
1183
-
1184
-
Counting CategoricalDtype
1185
-
~~~~~~~~~~~~~~~~~~~~~~~~~
1186
-
1187
-
As mentioned in :ref:`Equality Semantics <categorical.equalitysemantics>`, two instances of :class:`~pandas.api.types.CategoricalDtype` compare equal
1188
-
whenever they have the same categories and order. Therefore, when counting data types, the multiple instances of :class:`~pandas.api.types.CategoricalDtype` will be counted as one group if they have the same categories and order.
1189
-
In the example below, even though ``a``, ``c``, and ``d`` all have data types of ``category``, they will not be counted as one group since they don't have the same categories.
0 commit comments