We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85d4980 commit c46dee9Copy full SHA for c46dee9
doc/source/user_guide/io.rst
@@ -499,11 +499,14 @@ When using ``dtype=CategoricalDtype``, "unexpected" values outside of
499
``dtype.categories`` are treated as missing values.
500
501
.. ipython:: python
502
+ :okwarning:
503
504
dtype = CategoricalDtype(["a", "b", "d"]) # No 'c'
505
pd.read_csv(StringIO(data), dtype={"col1": dtype}).col1
506
-This matches the behavior of :meth:`Categorical.set_categories`.
507
+This matches the behavior of :meth:`Categorical.set_categories`. This behavior is
508
+deprecated. In a future version, the presence of non-NA values that are not
509
+among the specified categories will raise.
510
511
.. note::
512
0 commit comments