BUG: Offset-based rolling window, with only one raw in dataframe and closed='left', max and min functions make python crash
State: closed

- [ ] closes #24718 
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Bug
name: Window
description: rolling, ewma, expanding

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24811?src=pr&el=h1) Report
> Merging [#24811](https://codecov.io/gh/pandas-dev/pandas/pull/24811?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/17a6bc56e5ab6ad3dab12d3a8b20ed69a5830b6f?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/24811/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/24811?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #24811   +/-   ##
=======================================
  Coverage   92.38%   92.38%           
=======================================
  Files         166      166           
  Lines       52382    52382           
=======================================
  Hits        48395    48395           
  Misses       3987     3987
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.81% <ø> (ø)` | :arrow_up: |
| #single | `42.92% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24811?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24811?src=pr&el=footer). Last update [17a6bc5...417ca64](https://codecov.io/gh/pandas-dev/pandas/pull/24811?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24811?src=pr&el=h1) Report
> Merging [#24811](https://codecov.io/gh/pandas-dev/pandas/pull/24811?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/17a6bc56e5ab6ad3dab12d3a8b20ed69a5830b6f?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/24811/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/24811?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #24811      +/-   ##
==========================================
- Coverage   92.38%   92.38%   -0.01%     
==========================================
  Files         166      166              
  Lines       52382    52379       -3     
==========================================
- Hits        48395    48391       -4     
- Misses       3987     3988       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.81% <ø> (-0.01%)` | :arrow_down: |
| #single | `42.91% <ø> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24811?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/24811/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `88.04% <0%> (-0.1%)` | :arrow_down: |
| [pandas/core/indexes/timedeltas.py](https://codecov.io/gh/pandas-dev/pandas/pull/24811/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy90aW1lZGVsdGFzLnB5) | `90.22% <0%> (-0.03%)` | :arrow_down: |
| [pandas/core/computation/pytables.py](https://codecov.io/gh/pandas-dev/pandas/pull/24811/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tcHV0YXRpb24vcHl0YWJsZXMucHk=) | `92.35% <0%> (-0.03%)` | :arrow_down: |
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/24811/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `88.7% <0%> (-0.02%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24811?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24811?src=pr&el=footer). Last update [17a6bc5...2e513db](https://codecov.io/gh/pandas-dev/pandas/pull/24811?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Hi @jschendel, no worries. The entry has been added now.
thanks @jh-wu