Skip to content

DOC: create a table for period aliases #53530

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

Merged
merged 6 commits into from
Jun 9, 2023

Conversation

natmokval
Copy link
Contributor

related to pr #53477
Updated documentation for Time series / date functionality

Created a new table for period aliases. Added to the doc of Period dtypesreference to the table period aliases instead of offset aliases. Corrected docs for to_period. Pointed out that only frequencies from the table period aliases are valid for to_period.

@natmokval natmokval marked this pull request as ready for review June 6, 2023 08:06
@natmokval
Copy link
Contributor Author

@MarcoGorelli, could you please take a look at this pr?

@mroeschke mroeschke requested a review from MarcoGorelli June 6, 2023 18:01
@mroeschke mroeschke added Docs Period Period data type labels Jun 6, 2023
@MarcoGorelli
Copy link
Member

/preview

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2023

Website preview of this PR available at: https://pandas.pydata.org/preview/53530/

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Nice table! Great to have this, thanks, this will help users

I just have a comment - you write "we will refer to these aliases as period aliases", but then in the to_period docstring you write "period strings". Perhaps that should say "period aliases" instead?

cc @jbrockmendel in case you have any comments

@natmokval
Copy link
Contributor Author

I just have a comment - you write "we will refer to these aliases as period aliases", but then in the to_period docstring you write "period strings". Perhaps that should say "period aliases" instead?

Thank you, @MarcoGorelli for the comment. I corrected to_period docstring, as you suggested.

"D", "calendar day frequency"
"W", "weekly frequency"
"M", "monthly frequency"
"Q", "quarter end frequency"
Copy link
Member

Choose a reason for hiding this comment

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

Wait, for period there is no "end", should this be "quarter frequency"?

Copy link
Contributor Author

@natmokval natmokval Jun 9, 2023

Choose a reason for hiding this comment

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

Oops, my mistake. I'll correct it.

Update:
to keep all frequencies in a similar style I changed quarter end to quarterly. The same for year end frequency.

@MarcoGorelli MarcoGorelli added this to the 2.1 milestone Jun 9, 2023
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Nice, looks good to me!

@mroeschke mroeschke merged commit d2cd5e2 into pandas-dev:main Jun 9, 2023
@mroeschke
Copy link
Member

Thanks @natmokval

Daquisu pushed a commit to Daquisu/pandas that referenced this pull request Jul 8, 2023
* DOC: table for period aliases

* correct the to_period docstrings

* change quarter/year end to quarterly/yearly
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.

3 participants