BUG: Offset-based rolling window, with only one raw in dataframe and closed='left', max and min functions make python crash
- [ ] closes #24718 
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
