We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2be2ba5 commit c52a98dCopy full SHA for c52a98d
pandas/tests/test_resample.py
@@ -3175,6 +3175,15 @@ def test_median_duplicate_columns(self):
3175
expected.columns = result.columns
3176
assert_frame_equal(result, expected)
3177
3178
+ def test_resample_list_grouper_with_nat(self):
3179
+ # GH 14715
3180
+ df = pd.DataFrame({'date': pd.date_range('1/1/2011',
3181
+ periods=365, freq='D')})
3182
+ df.iloc[-1] = pd.NaT
3183
+ result = df.groupby([pd.Grouper(key='date', freq='AS')])
3184
+ expected = {pd.Timestamp('2011-01-01'): pd.Index(list(range(364)))}
3185
+ tm.assert_dict_equal(result.groups, expected)
3186
+
3187
3188
class TestTimeGrouper(object):
3189
0 commit comments