-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
implemented fix for groupby date bug, #11324 #11460
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
@@ -824,6 +824,32 @@ def test_apply_issues(self): | |||
result = df.groupby('date').apply(lambda x: x['time'][x['value'].idxmax()]) | |||
assert_series_equal(result, expected) | |||
|
|||
def test_time_field_bug_no_conversion(self): | |||
df = pd.DataFrame({ |
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.
add the issue number here as a coment
pls add a whatsnew comment (bug fix section), and squash. |
@@ -824,6 +824,28 @@ def test_apply_issues(self): | |||
result = df.groupby('date').apply(lambda x: x['time'][x['value'].idxmax()]) | |||
assert_series_equal(result, expected) | |||
|
|||
def test_time_field_bug(self): | |||
# test a fix for GH issue 11324 |
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.
add a comment about what this bug fix is about
…das-dev#11324) Addressed PR comments Added comments and updated whatsnew
0f14ebc
to
4791e15
Compare
Added comments to test, made an entry in v0.17.1.txt, and squashed commits. |
@@ -117,3 +117,5 @@ Bug Fixes | |||
- Bug in ``to_excel`` with openpyxl 2.2+ and merging (:issue:`11408`) | |||
|
|||
- Bug in ``DataFrame.to_dict()`` produces a ``np.datetime64`` object instead of ``Timestamp`` when only datetime is present in data (:issue:`11327`) | |||
|
|||
- Bug in ``pandas.core.groupby`` raises exception when ``func`` in ``df.groupby(...).apply(func)`` doesn't return existing time columns (:issue:`11324`) |
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.
make the text like your commit message, much simpler
merged via 5df693f thanks! |
This is a fix for issue #11324 in which grouping when datetime fields are involved raises an exceptoin