Skip to content

DOC: further clarifications to docstring guide #20309

Open
@jorisvandenbossche

Description

@jorisvandenbossche

I merged the docstring guide #19704 in its current state from the sprint.

But based on the sprint experience, I think we noticed a few areas that can use further clarifications to have less confusion / discussion:

  • Better overview of when to use which type of quotes (single quotes ' or single ` or double backticks ``). The way I currently review:
    • no quotes in type description (even if it may need one according to next rules)
    • single backticks to reference parameter names
    • double backticks for small code snippets, like False or param=value, but, often used class names of pandas like Series, DataFrame, Index are not quoted.
  • In specifications like "See Also" or "Returns", include .pandas or not?
  • Do we use refer to missing values as "NA", "NaN", "NA/NaN", ..
  • Are we OK with using "label" in type descriptions to refer to column names? (instead of str, as this is in principle too restrictive)
  • ...

Did you experience any others?

Let's discuss here what to do with them. Detailed inline comments can still be made on #19704

cc @datapythonista @WillAyd @TomAugspurger @jreback

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