-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Resolving Index Resetting for tz_localize #43226
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
Adding a test case
Hello @kurchi1205! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-09-03 07:38:24 UTC |
@mroeschke Can you please review this pull request . |
As the pep8speaks comment notes, you have some code style issues in your test. Please run |
I have solved the code issues using |
doc/source/whatsnew/v1.3.3.rst
Outdated
@@ -25,8 +25,8 @@ Fixed regressions | |||
|
|||
Bug fixes | |||
~~~~~~~~~ | |||
- Bug in :meth:`.DataFrameGroupBy.agg` and :meth:`.DataFrameGroupBy.transform` with ``engine="numba"`` where ``index`` data was not being correctly passed into ``func`` (:issue:`43133`) | |||
- | |||
- Bug in :meth:`.DataFrameGroupBy.agg` and :meth:`.DataFrameGroupBy.transform` with engine="numba" where index data was not being correctly passed into func (:issue:`43133`) |
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.
Please revert the changes to this entry.
doc/source/whatsnew/v1.3.3.rst
Outdated
- Bug in :meth:`.DataFrameGroupBy.agg` and :meth:`.DataFrameGroupBy.transform` with ``engine="numba"`` where ``index`` data was not being correctly passed into ``func`` (:issue:`43133`) | ||
- | ||
- Bug in :meth:`.DataFrameGroupBy.agg` and :meth:`.DataFrameGroupBy.transform` with engine="numba" where index data was not being correctly passed into func (:issue:`43133`) | ||
- Fixed bug in :func:`__new__` of :class:`CombinedDatetimelikeProperties` maintains index of Categorical Datetime series (:issue:`43080`) |
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 note should go in
v.1.4.0.rst
- The message should relate to a user facing API i.e.
dt.tz_convert
on aCategorialIndex
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.
Ok I will make the necessary changes ,
Just wanted to be clear , why it shouldn't be in v.1.3.3.rst
?
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.
1.3.3 is typically for regressions or bugs for very recently added features
date_range(start="2021-01-01T02:00:00", periods=5, freq="1D"), | ||
index=[2, 6, 7, 8, 11], | ||
) | ||
cat_series = dt_series.astype(CategoricalDtype()) |
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 construct without astype?
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.
yeah , I have done that .
doc/source/whatsnew/v1.4.0.rst
Outdated
@@ -276,7 +276,7 @@ Timedelta | |||
|
|||
Timezones | |||
^^^^^^^^^ | |||
- | |||
- Bug in :meth:`dt.tz_convert` resetting index in a :class:`Series` with :class:`CategoricalIndex` (:issue:`43080`) |
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 won't render, try Series.dt.tz_convert
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 looks good. comment & pls merge master and ping on green.
I have made the change in the documentation . |
I assume some maintainer has to merge the pull request. |
How to solve this timeout error ? |
Committing again with no changes to solve timeout error
lgtm @phofl merge when good |
Can someone help me understand this failing test ? How are my changes affecting this test case ? |
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.
Lgtm failure unrelated
Thx @kurchi1205 |
ok thnx for the clarification |
* Resolving Index Resetting for tz_localize * Update test_tz_localize.py Adding a test case * Solving PEP-8 Issues * Changing Test Case and updating whatsnew * Changing Test Case and updating whatsnew * updating whatsnew * updating whatsnew * updating whatsnew * Making the necessary changes * Update test_tz_localize.py * Update test_tz_localize.py * Changes made * Update test_tz_localize.py * Commiting Again * Change in whatsnew * Update v1.4.0.rst Committing again with no changes to solve timeout error * Pre-commiting * Pre-commiting * New Test Case * Test Case Modified
I have added a test function
test_series_tz_localize_matching_index
intest_tz_localize.py
Index of the original series is preserved while converting
categorical
data todatetime