Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

robdmc
Copy link
Contributor

@robdmc robdmc commented Oct 28, 2015

This is a fix for issue #11324 in which grouping when datetime fields are involved raises an exceptoin

@robdmc robdmc changed the title implemented a fix a wrote tests implemented fix for groupby date bug Oct 28, 2015
@jreback jreback changed the title implemented fix for groupby date bug implemented fix for groupby date bug, #11324 Oct 28, 2015
@@ -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({
Copy link
Contributor

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

@jreback jreback added Bug Datetime Datetime data dtype Groupby labels Oct 28, 2015
@jreback jreback added this to the 0.17.1 milestone Oct 28, 2015
@jreback
Copy link
Contributor

jreback commented Oct 29, 2015

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
Copy link
Contributor

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
@robdmc robdmc force-pushed the fix_groupby_time_field_bug branch from 0f14ebc to 4791e15 Compare November 4, 2015 17:10
@robdmc
Copy link
Contributor Author

robdmc commented Nov 4, 2015

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`)
Copy link
Contributor

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

@jreback
Copy link
Contributor

jreback commented Nov 13, 2015

merged via 5df693f

thanks!

@jreback jreback closed this Nov 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datetime Datetime data dtype Groupby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants