-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH: GH11128 add weekday_name to DatetimeIndex and .dt #12803
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
Completed merge of Bahrunnur's PR 'weekday-name' Moved 'enhancements' to v0.18.1.txt Added tests to pandas/tests/series/test_datetime_values.py Added weekday_name property producing 'NaT' to NaTType class Author: BastiaanBergman <Bastiaan.Bergman@gmailcom>
@@ -469,6 +469,7 @@ These can be accessed like ``Series.dt.<property>``. | |||
Series.dt.days_in_month | |||
Series.dt.tz | |||
Series.dt.freq | |||
Series.dt.weekday_name |
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.
can you move after .weekday
@@ -32,7 +32,7 @@ def test_ops_properties(self): | |||
'is_month_start', 'is_month_end', | |||
'is_quarter_start', | |||
'is_quarter_end', 'is_year_start', | |||
'is_year_end'], |
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.
there are addl tests in tests/series/test_datetime_values.py
(just add the new propery name)
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.
Yes, and they were added to in my original PR.
looks good. just some minor points. come to think of it, prob should add |
I think we can just instantiate the
then use |
-Moved to group .weekday_name next to .weekday in docs -Added Timestamp test to tseries/tests/test_timeseries.py -Change dtype of weekday_name to np.object_
@@ -25,7 +25,7 @@ class TestSeriesDatetimeValues(TestData, tm.TestCase): | |||
|
|||
def test_dt_namespace_accessor(self): | |||
|
|||
# GH 7207 | |||
# GH 7207, 11128 |
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.
I mean add it here as well
ok this looks good. I'd like to use the |
xref #12806 |
can you try adding this with the |
Yes, just need to find the time, maybe later this week.
|
@BastiaanBergman ok, great thanks |
@jorisvandenbossche comments? I guess we can address using |
Sorry, didn't get to it, will try again late May. |
Looks good |
thanks! |
closes #11128
replaces #11813
git diff upstream/master | flake8 --diff
Completed merge of Bahrunnur's PR 'weekday-name'
Moved 'enhancements' to v0.18.1.txt
Added tests to pandas/tests/series/test_datetime_values.py
Added weekday_name property producing 'NaT' to NaTType class