Skip to content

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

Merged
merged 5 commits into from
May 17, 2023
Merged

Conversation

DeaMariaLeon
Copy link
Member

Towards #37875

@DeaMariaLeon DeaMariaLeon requested a review from MarcoGorelli May 17, 2023 09:03
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 examples! Just got a small comment, then this can go in

Comment on lines 1667 to 1678
>>> 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]
Copy link
Member

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')

Copy link
Member Author

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!

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.

thanks @DeaMariaLeon !

@MarcoGorelli MarcoGorelli added this to the 2.1 milestone May 17, 2023
@MarcoGorelli MarcoGorelli merged commit e3c8af5 into pandas-dev:main May 17, 2023
@DeaMariaLeon DeaMariaLeon deleted the examples2 branch May 17, 2023 12:29
@DeaMariaLeon
Copy link
Member Author

Thanks!

topper-123 pushed a commit to topper-123/pandas that referenced this pull request May 22, 2023
* Added examples

* Changed end_time example

* Update pandas/core/arrays/datetimes.py

---------

Co-authored-by: Marco Edward Gorelli <[email protected]>
Daquisu pushed a commit to Daquisu/pandas that referenced this pull request Jul 8, 2023
* Added examples

* Changed end_time example

* Update pandas/core/arrays/datetimes.py

---------

Co-authored-by: Marco Edward Gorelli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants