Skip to content

Commit

Permalink
TST: test for expanding window with min_periods GH25857 (pandas-dev#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
theMogget authored Oct 16, 2020
1 parent 9273967 commit e719538
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pandas/tests/window/test_expanding.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ def test_expanding_count_default_min_periods_with_null_values(constructor):
tm.assert_equal(result, expected)


@pytest.mark.parametrize("constructor", [Series, DataFrame])
def test_expanding_count_with_min_periods_exceeding_series_length(constructor):
# GH 25857
result = constructor(range(5)).expanding(min_periods=6).count()
expected = constructor([np.nan, np.nan, np.nan, np.nan, np.nan])
tm.assert_equal(result, expected)


@pytest.mark.parametrize(
"df,expected,min_periods",
[
Expand Down

0 comments on commit e719538

Please sign in to comment.