Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Improve docs in the dt namespace #59976

Open
rhshadrach opened this issue Oct 5, 2024 · 3 comments
Open

DOC: Improve docs in the dt namespace #59976

rhshadrach opened this issue Oct 5, 2024 · 3 comments
Labels
Docs Needs Discussion Requires discussion from core team before further action

Comments

@rhshadrach
Copy link
Member

rhshadrach commented Oct 5, 2024

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.

@rhshadrach rhshadrach added Docs Needs Discussion Requires discussion from core team before further action labels Oct 5, 2024
@saldanhad
Copy link
Contributor

#59671

@Rahul20037237
Copy link

can I take this?

@rhshadrach
Copy link
Member Author

Discussed on the last dev call, the plan here is to improve the docstrings on the underlying array methods so that additional and highly redundant documentation does not need to be added. I plan to update the OP with a list of methods and instructions for updating the docstrings. Once that is up, work can commence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Needs Discussion Requires discussion from core team before further action
Projects
None yet
Development

No branches or pull requests

3 participants