Closed
Description
Pandas version checks
- I have checked that the issue still exists on the latest versions of the docs on
main
here
Location of the documentation
https://pandas.pydata.org/docs/reference/api/pandas.io.formats.style.Styler.apply_index.html
https://pandas.pydata.org/docs/reference/api/pandas.io.formats.style.Styler.background_gradient.html
Documentation problem
Template strings that are in the first line of the doctest i.e. line starting with >>>, are flagged as syntax errors.
A guess is that perhaps flake8 identifies the doctests chunks & runs the syntax checking before the docstrings are rendered, and there is perhaps a bug (or perhaps there are other reasons) where the string interpolation is flagged as a syntax error for the first line.
Detailed testing & more information about this error can be found here #51356 (comment)
Suggested fix for documentation
Would need to discuss how to fix the template problem in doctests.