We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8b10b0 commit ec1f316Copy full SHA for ec1f316
pandas/tseries/tests/test_resample.py
@@ -217,6 +217,20 @@ def test_groupby_resample_api(self):
217
lambda x: x.resample('1D').ffill())[['val']]
218
assert_frame_equal(result, expected)
219
220
+ def test_grouby_resample_on_api(self):
221
+
222
+ # GH 15021
223
+ # .groupby(...).resample(on=...) results in an unexpected
224
+ # keyword warning.
225
+ df = pd.DataFrame({'key': ['A', 'B'] * 5,
226
+ 'dates': pd.date_range('2016-01-01', periods=10),
227
+ 'values': np.random.randn(10)})
228
229
+ expected = df.set_index('dates').groupby('key').resample('D').mean()
230
231
+ result = df.groupby('key').resample('D', on='dates').mean()
232
+ assert_frame_equal(result, expected)
233
234
def test_plot_api(self):
235
tm._skip_if_no_mpl()
236
0 commit comments