Skip to content

TST: GH6410 / numpy 4328 #6413

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

Merged
merged 1 commit into from
Feb 19, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pandas/core/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -1849,7 +1849,6 @@ def transform(self, func, *args, **kwargs):

for name, group in self:

group = com.ensure_float(group)
object.__setattr__(group, 'name', name)
res = wrapper(group)
if hasattr(res, 'values'):
Expand Down
9 changes: 9 additions & 0 deletions pandas/tests/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -2731,6 +2731,15 @@ def test_groupby_max_datetime64(self):
result = df.groupby('A')['A'].max()
assert_series_equal(result,expected)

def test_groupby_datetime64_32_bit(self):
# GH 6410 / numpy 4328
# 32-bit under 1.9-dev indexing issue

df = DataFrame({"A": range(2), "B": [pd.Timestamp('2000-01-1')]*2})
result = df.groupby("A")["B"].transform(min)
expected = Series([pd.Timestamp('2000-01-1')]*2)
assert_series_equal(result,expected)

def test_groupby_categorical_unequal_len(self):
import pandas as pd
#GH3011
Expand Down