Skip to content
Merged
Changes from 1 commit
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
Next Next commit
TST: fix spurious tests for test_groupby (GH6436)
  • Loading branch information
jreback committed Feb 22, 2014
commit 66c9d9e451a72496bdeffc72a474c910119ef78f
3 changes: 2 additions & 1 deletion pandas/tests/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,7 @@ def test_frame_groupby(self):
assert_frame_equal(stragged, aggregated, check_names=False)

# transform
grouped = self.tsframe.head(30).groupby(lambda x: x.weekday())
transformed = grouped.transform(lambda x: x - x.mean())
self.assertEqual(len(transformed), 30)
self.assertEqual(len(transformed.columns), 4)
Expand Down Expand Up @@ -2203,7 +2204,7 @@ def test_panel_groupby(self):
grouped = self.panel.groupby(lambda x: x.month, axis='major')
agged = grouped.mean()

self.assert_numpy_array_equal(agged.major_axis, [1, 2])
self.assert_numpy_array_equal(agged.major_axis, sorted(list(set(self.panel.major_axis.month))))

grouped = self.panel.groupby({'A': 0, 'B': 0, 'C': 1, 'D': 1},
axis='minor')
Expand Down