diff --git a/pandas/core/groupby.py b/pandas/core/groupby.py index 9659d4c3bd6e0..eabe1b43004df 100644 --- a/pandas/core/groupby.py +++ b/pandas/core/groupby.py @@ -635,11 +635,11 @@ def apply(self, func, *args, **kwargs): @wraps(func) def f(g): - # ignore SettingWithCopy here in case the user mutates - with option_context('mode.chained_assignment',None): - return func(g, *args, **kwargs) + return func(g, *args, **kwargs) - return self._python_apply_general(f) + # ignore SettingWithCopy here in case the user mutates + with option_context('mode.chained_assignment',None): + return self._python_apply_general(f) def _python_apply_general(self, f): keys, values, mutated = self.grouper.apply(f, self._selected_obj, diff --git a/pandas/io/tests/test_data.py b/pandas/io/tests/test_data.py index 15ebeba941ccd..e798961ea7bf9 100644 --- a/pandas/io/tests/test_data.py +++ b/pandas/io/tests/test_data.py @@ -445,7 +445,10 @@ def test_fred(self): end = datetime(2013, 1, 27) received = web.DataReader("GDP", "fred", start, end)['GDP'].tail(1)[0] - self.assertEqual(int(received), 16535) + + # < 7/30/14 16535 was returned + #self.assertEqual(int(received), 16535) + self.assertEqual(int(received), 16502) self.assertRaises(Exception, web.DataReader, "NON EXISTENT SERIES", 'fred', start, end)