diff --git a/pandas/tests/resample/test_resampler_grouper.py b/pandas/tests/resample/test_resampler_grouper.py index 209f2e74d97de..2f26e64d0341f 100644 --- a/pandas/tests/resample/test_resampler_grouper.py +++ b/pandas/tests/resample/test_resampler_grouper.py @@ -327,25 +327,6 @@ def test_apply_columns_multilevel(): tm.assert_frame_equal(result, expected) -def test_apply_non_naive_index(): - def weighted_quantile(series, weights, q): - series = series.sort_values() - cumsum = weights.reindex(series.index).fillna(0).cumsum() - cutoff = cumsum.iloc[-1] * q - return series[cumsum >= cutoff].iloc[0] - - times = date_range("2017-6-23 18:00", periods=8, freq="15T", tz="UTC") - data = Series([1.0, 1, 1, 1, 1, 2, 2, 0], index=times) - weights = Series([160.0, 91, 65, 43, 24, 10, 1, 0], index=times) - - result = data.resample("D").apply(weighted_quantile, weights=weights, q=0.5) - ind = date_range( - "2017-06-23 00:00:00+00:00", "2017-06-23 00:00:00+00:00", freq="D", tz="UTC" - ) - expected = Series([1.0], index=ind) - tm.assert_series_equal(result, expected) - - def test_resample_groupby_with_label(): # GH 13235 index = date_range("2000-01-01", freq="2D", periods=5) @@ -693,4 +674,4 @@ def test_groupby_resample_on_index_with_list_of_keys_missing_column(): ), ) with pytest.raises(KeyError, match="Columns not found"): - df.groupby("group").resample("2D")[["val_not_in_dataframe"]].mean() + df.groupby("group").resample("2D")[["val_not_in_dataframe"]].mean() \ No newline at end of file