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:
118
118
Overview of behavior differences and how to address them
119
119
---------------------------------------------------------
120
120
121
- The dtype is no longer object dtype
122
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121
+ The dtype is no longer a numpy " object" dtype
122
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
123
123
124
124
When inferring or reading string data, the data type of the resulting DataFrame
125
125
column 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).
127
132
128
133
Checking the dtype
129
134
^^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments