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

Fix docstrings for pandas.Period.month #59517

Merged
merged 9 commits into from
Aug 15, 2024

Conversation

uditbaliyan
Copy link
Contributor

@uditbaliyan uditbaliyan commented Aug 14, 2024

Part of #59458

Addresses:
pandas.Period.month having SA01
pandas.Period.asfreq SA01

Changes:
Added See Also section .
Added Returns section .
Added extended section .
Added notes section .
Added examples section .
Removed "pandas.Period.month SA01" and "pandas.Period.asfreq SA01" from code_checks.sh

"""
Return the month this Period falls on.
"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in indent was correct before

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. I've updated the indentation of the function in pandas/_libs/tslibs/period.pyx.
If you have any further suggestions or if there's anything specific you’d like me to address, please let me know!

Comment on lines 2052 to 2062
Handle a case where the Period object is invalid or empty, which results in `NaN`:

>>> period = pd.Period('nan', 'M')
>>> period.month
nan

Handle a case where the Period object is invalid or empty, which results in `NaN`:

>>> period = pd.Period('nan', 'M')
>>> period.month
nan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repeated?

@MarcoGorelli
Copy link
Member

thnx, please check ci failure

@rhshadrach rhshadrach added Docs Period Period data type labels Aug 14, 2024
@mroeschke mroeschke added this to the 3.0 milestone Aug 15, 2024
@mroeschke mroeschke merged commit 60e36d9 into pandas-dev:main Aug 15, 2024
47 checks passed
@mroeschke
Copy link
Member

Thanks @uditbaliyan

@uditbaliyan uditbaliyan deleted the fixing-good-first-issues branch August 15, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Period Period data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants