Skip to content

day_of_year #25924

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

Closed
wants to merge 26 commits into from
Closed

day_of_year #25924

wants to merge 26 commits into from

Conversation

oleksii-polovyi
Copy link

@codecov
Copy link

codecov bot commented Mar 29, 2019

Codecov Report

Merging #25924 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #25924      +/-   ##
==========================================
- Coverage   91.85%   91.85%   -0.01%     
==========================================
  Files         174      174              
  Lines       50722    50722              
==========================================
- Hits        46593    46589       -4     
- Misses       4129     4133       +4
Flag Coverage Δ
#multiple 90.39% <100%> (ø) ⬆️
#single 41.78% <100%> (-0.09%) ⬇️
Impacted Files Coverage Δ
pandas/core/indexes/period.py 92.58% <ø> (ø) ⬆️
pandas/core/indexes/datetimes.py 96.36% <ø> (ø) ⬆️
pandas/core/arrays/period.py 98.53% <100%> (ø) ⬆️
pandas/core/arrays/datetimes.py 97.79% <100%> (ø) ⬆️
pandas/io/gbq.py 78.94% <0%> (-10.53%) ⬇️
pandas/core/frame.py 97% <0%> (-0.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 437efa6...558f804. Read the comment docs.

@mroeschke
Copy link
Member

dayofyear cannot be directly replaced with day_of_year all at once. A new day_of_year method needs to be created first and then dayofyear needs a deprecation warning (all of which can be done in this PR). If you could do the same with dayofweek that'd be great.

@mroeschke mroeschke added Datetime Datetime data dtype API Design Deprecate Functionality to remove in pandas labels Mar 29, 2019
@oleksii-polovyi
Copy link
Author

@mroeschke thank you for your feedback.
TODO:

  • deprecation warnings
  • dayofweek

@Violet-XiaoWeiHuang
Copy link

Violet-XiaoWeiHuang commented Apr 2, 2019

Hello @mroeschke ,
I'm a new comer to Pandas, I notice there're other timeseries accessors like 'weekofyear'. MDo you want me to work on it?
Thank you.

@mroeschke
Copy link
Member

Thanks for the interest @Violet-XiaoWeiHuang. Since the fix is the same as these other accessors, I'll give @ApolllonDev the choice whether to work on the other accessors as well or pass it on to you.

@oleksii-polovyi
Copy link
Author

That would be great!

@@ -1368,8 +1368,8 @@ def date(self):
'weekday_name',
"The name of day in a week (ex: Friday)\n\n.. deprecated:: 0.23.0")

dayofyear = _field_accessor('dayofyear', 'doy',
"The ordinal day of the year.")
day_of_year = _field_accessor('day_of_year', 'doy',
Copy link
Contributor

Choose a reason for hiding this comment

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

we need to preserve the original with a deprecation warning

Copy link
Author

@oleksii-polovyi oleksii-polovyi Apr 18, 2019

Choose a reason for hiding this comment

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

Thank you for your feedback.

@mroeschke mroeschke mentioned this pull request Apr 15, 2019
4 tasks
@jreback
Copy link
Contributor

jreback commented May 12, 2019

pls update per comments

@pep8speaks
Copy link

pep8speaks commented Jun 2, 2019

Hello @ApolllonDev! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 51:1: W293 blank line contains whitespace

Comment last updated at 2019-06-02 19:44:58 UTC

@oleksii-polovyi oleksii-polovyi deleted the issue-9606 branch June 2, 2019 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Datetime Datetime data dtype Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API: timeseries accessors naming convention
5 participants