-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Description
Now the string dtype is turned on by default (#61722), we also have to fix the doctests to match the new behaviour (the doctests are currently, temporarily, allowed to fail to avoid red CI until this issue is fixed).
The failures can be seen in the current doctests logs, for example at https://github.com/pandas-dev/pandas/actions/runs/16332737970/job/46138722939#step:6:23
There are two main groups of failures:
dtype: object
that needs to becomedtype: str
in Series output (or object->str in some other reprs, and a few None->NaN changes)- The representation of Categorical no longer using quoted values
I would propose to first start with the first bullet point (we should maybe reconsider if the categorical repr change is actually what we want -> #61890), and the failing files are:
-
pandas/core/base.py
(DOC: fix doctests for pandas/core/base.py for new string dtype #61905) -
pandas/core/generic.py
-
pandas/core/strings/accessor.py
-
pandas/core/arrays/datetimelike.py
,pandas/core/arrays/datetimes.py
andpandas/core/indexes/datetimelike.py
Let's do one PR per bullet point here.
You can run the doctest and verify changes with for example:
pytest --doctest-modules pandas/core/base.py
Example PR for some fixes in other files: #61887