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
:meth:`DataFrame.astype` can now perform columnwise conversion to ``Categorical`` by supplying the string ``'category'`` or a :class:`~pandas.api.types.CategoricalDtype`.
278
-
Previously, attempting this would raise a ``NotImplementedError``. (:issue:`18099`)
277
+
:meth:`DataFrame.astype` can now perform column-wise conversion to ``Categorical`` by supplying the string ``'category'`` or
278
+
a :class:`~pandas.api.types.CategoricalDtype`. Previously, attempting this would raise a ``NotImplementedError``. See the
279
+
:ref:`categorical.objectcreation` section of the documentation for more details and examples. (:issue:`12860`, :issue:`18099`)
279
280
280
-
Supplying the string ``'category'`` performs columnwise conversion, with only labels appearing in a given column set as categories:
281
+
Supplying the string ``'category'`` performs column-wise conversion, with only labels appearing in a given column set as categories:
281
282
282
283
.. ipython:: python
283
284
@@ -298,8 +299,6 @@ Supplying a ``CategoricalDtype`` will make the categories in each column consist
298
299
df['A'].dtype
299
300
df['B'].dtype
300
301
301
-
See the :ref:`categorical.objectcreation` section of the documentation for more details and examples.
0 commit comments