Skip to content

DOC: Improve docs in the dt namespace #59976

Open
@rhshadrach

Description

@rhshadrach

Ref: #59878 (comment)

E.g. https://pandas.pydata.org/docs/dev/reference/api/pandas.Series.dt.to_period.html

We currently copy the docstring from the underlying array method, which is at times either vague or incorrect as in the example above. We could instead override the docstring with custom value in pandas/core/accessor.py in the _create_delegator_method function. We would need a place to store the docstrings, and it would be a significant effort to add them all.

Possible approach: Create a new subdirectory, pandas/core/docstrings/ for storing docstrings for purposes like this, and add series_dt.py there. It would contain a dictionary mapping the method name to the docstring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsNeeds DiscussionRequires discussion from core team before further action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions