Now the string dtype is turned on by default (https://github.com/pandas-dev/pandas/pull/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 become dtype: 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 -> https://github.com/pandas-dev/pandas/issues/61890), and the failing files are:

  • [ ] pandas/core/base.py
  • [ ] pandas/core/generic.py
  • [ ] pandas/core/strings/accessor.py
  • [ ] pandas/core/arrays/datetimelike.py, pandas/core/arrays/datetimes.py and pandas/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: https://github.com/pandas-dev/pandas/pull/61887

Comment From: jorisvandenbossche

@Nadav-Zilberberg as I mentioned in the issue, please wait with the categorical failures (discussion for that in https://github.com/pandas-dev/pandas/issues/61890). Also do you have a PR for this that is "ready for review"? I don't see one, and the issue linking here is just a copy of this issue in your own repo, and so this looks more like spam.

Comment From: simonjayhawkins

@jorisvandenbossche added blocker tags since I think we want to revert the changes in #61722 for the doc build continue-on-error: true before release?

Comment From: jorisvandenbossche

It's not critical for the RC, but ideally those are fixed for the final release (note the doc build itself is already fixed and running again, this is only the doctests)

Comment From: arthurlw

take