Skip to content

Commit 0f14ebc

Browse files
committed
Added comments and updated whatsnew
1 parent edfa82a commit 0f14ebc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

doc/source/whatsnew/v0.17.1.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,5 @@ Bug Fixes
117117
- Bug in ``to_excel`` with openpyxl 2.2+ and merging (:issue:`11408`)
118118

119119
- Bug in ``DataFrame.to_dict()`` produces a ``np.datetime64`` object instead of ``Timestamp`` when only datetime is present in data (:issue:`11327`)
120+
121+
- Bug in ``pandas.core.groupby`` raises exception when ``func`` in ``df.groupby(...).apply(func)`` doesn't return existing time columns (:issue:`11324`)

pandas/tests/test_groupby.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,9 @@ def test_apply_issues(self):
825825
assert_series_equal(result, expected)
826826

827827
def test_time_field_bug(self):
828-
# test a fix for GH issue 11324
828+
# Test a fix for the following error related to GH issue 11324
829+
# When non-key fields in a group-by dataframe contained time-based fields that
830+
# were not returned by the apply function, an exception would be raised.
829831

830832
df = pd.DataFrame({'a': 1,'b': [datetime.now() for nn in range(10)]})
831833

0 commit comments

Comments
 (0)