File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -118,12 +118,17 @@ through the ``str`` accessor will work the same:
118118Overview of behavior differences and how to address them
119119---------------------------------------------------------
120120
121- The dtype is no longer object dtype
122- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121+ The dtype is no longer a numpy " object" dtype
122+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
123123
124124When inferring or reading string data, the data type of the resulting DataFrame
125125column or Series will silently start being the new ``"str" `` dtype instead of
126- ``"object" `` dtype, and this can have some impact on your code.
126+ the numpy ``"object" `` dtype, and this can have some impact on your code.
127+
128+ The new string dtype is a pandas data type ("extension dtype"), and no longer a
129+ numpy ``np.dtype `` instance. Therefore, passing the dtype of a string column to
130+ numpy functions will no longer work (e.g. passing it to a ``dtype= `` argument
131+ of a numpy function, or using ``np.issubdtype `` to check the dtype).
127132
128133Checking the dtype
129134^^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments