Skip to content

DOC: to quote or not to quote #19750

Closed
Closed
@jorisvandenbossche

Description

@jorisvandenbossche

That's the question :-)

Whether we double-backtick-quote (to make it look like code) certain terms, such as Series and DataFrame, in our documentation is at the moment rather inconsistent.
And @jreback recently started to regularly ask during reviews to quote them. And it is certainly good to be consistent on this, but I am personally not sure I find the quoted version better (and I have the feeling it will give more work while reviewing).
It's not the most important issue, but since we are putting work in it to make it consistent (eg PRs of @tommyod eg #19747 and older ones, and the reviewing comments we give), I thought this could be discussed.

So currently we use both DataFrame and DataFrame a lot throughout the docs, the unquoted version a little bit more (based on a quick grep of the text in the user guide (so without code-blocks), I see 418 times un-quoted DataFrame(s) and 241 quoted, and 273 unquoted Series and 187 quoted). But just to say we are not really consistent at the moment. And in our docstrings, I think we generally use the unquoted version.

So as you can guess, my preference would be to keep them mostly unquoted. My reason: in my opinion, this keeps the text "lighter", to not have code-formatted words constantly, code-formatting them gives more distraction in reading it. Plus, it will highlight those methods that we do quote more, to a reader skimming the text will more quickly see what methods it is about.

In general small code snippets and methods should be quoted (although that actually every method that appears in the text should be a reference to their docstring), but DataFrame and Series are such common words and often used in general without always explicitly referring to the class (code-wise), that IMO it is not needed to quote them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions