-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Fixing EX01 - Added examples #53262
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice examples! Just got a small comment, then this can go in
pandas/_libs/tslibs/period.pyx
Outdated
>>> period = pd.period_range('2020-1-1 00:00', '2020-3-1 00:00', freq='M') | ||
>>> s = pd.Series(period) | ||
>>> s | ||
0 2020-01 | ||
1 2020-02 | ||
2 2020-03 | ||
dtype: period[M] | ||
>>> s.dt.end_time | ||
0 2020-01-31 23:59:59.999999999 | ||
1 2020-02-29 23:59:59.999999999 | ||
2 2020-03-31 23:59:59.999999999 | ||
dtype: datetime64[ns] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method is about Period.end_time
, rather than Series.dt.end_time
- how about we change it to show
In [8]: Period('2020-01', 'D').end_time
Out[8]: Timestamp('2020-01-01 23:59:59.999999999')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed, thanks.
I meant to add an example for Series.dt.end_time
so, I put it on the wrong file!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @DeaMariaLeon !
Thanks! |
* Added examples * Changed end_time example * Update pandas/core/arrays/datetimes.py --------- Co-authored-by: Marco Edward Gorelli <[email protected]>
* Added examples * Changed end_time example * Update pandas/core/arrays/datetimes.py --------- Co-authored-by: Marco Edward Gorelli <[email protected]>
Towards #37875