Repository: pvlib/pvanalytics (language: python)

Issue:
Support pandas >= 1.1.0
Pandas seems to have ironed out the `.groupby().rolling()` bugs that were introduced in version 1.1.0. Unfortunately, while the two obvious bugs that were initially holding up this change have been fixed, the behavior seems to have changed. In particular these two tests fail at pandas 1.1.3:

- `tests/features/test_daytime.py::test_daytime_split_day`
- `tests/features/test_daytime.py::test_daytime_daylight_savings`

The output for both classifies some data that is obviously daytime as night. Might still be a pandas bug, but I'm not sure at this point.


Discussion / hints:
![Rolling_groupby_gaps](https://user-images.githubusercontent.com/2073227/98606184-fc218180-22a3-11eb-8731-1b2b1685334e.png)

`rolling().groupby()` in `daytime._rolling_by_minute()` results in strange gaps near the end of the series. I think this comes up for `test_daytime_split_day` but not other tests because the gaps are during the night-time periods for the other tests (and comparison with NaN is always False). 
Pandas 1.1.x is apparently still suffering from [bugs in `.groupby().rolling()`](https://github.com/pandas-dev/pandas/issues/37743)

Fix patch:
diff --git a/docs/whatsnew/0.1.1.rst b/docs/whatsnew/0.1.1.rst
index 12d09c68..adfb37a7 100644
--- a/docs/whatsnew/0.1.1.rst
+++ b/docs/whatsnew/0.1.1.rst
@@ -20,7 +20,10 @@ Bug Fixes
 ~~~~~~~~~
 
 * Added nan_policy to zscore calculation
-  :py:func:`pvanalytics.quality.outliers.zscore`.
+  :py:func:`pvanalytics.quality.outliers.zscore`. (:issue:`102`, :pull:`108`)
+* Prohibit pandas versions in the 1.1.x series to avoid an issue in
+  ``.groupby().rolling()``.  Newer versions starting in 1.2.0 and older
+  versions going back to 0.24.0 are still allowed. (:issue:`82`, :pull:`118`)
 
 Contributors
 ~~~~~~~~~~~~
diff --git a/requirements.txt b/requirements.txt
index b195b452..8cd5c46c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
 numpy>=1.15.0
-pandas>=0.24.0,<1.1.0
+pandas>=0.24.0,!=1.1.*
 pvlib>=0.8.0
 scipy>=1.2.0
 statsmodels>=0.9.0
diff --git a/setup.py b/setup.py
index e6917256..5b626a9f 100644
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,7 @@
 
 INSTALL_REQUIRES = [
     'numpy >= 1.15.0',
-    'pandas >= 0.24.0',
+    'pandas >= 0.24.0, != 1.1.*',
     'pvlib >= 0.8.0',
     'scipy >= 1.2.0',
     'statsmodels >= 0.9.0',


Test patch:
diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml
index 47a0a508..135022b4 100644
--- a/.github/workflows/lint-and-test.yml
+++ b/.github/workflows/lint-and-test.yml
@@ -7,7 +7,7 @@ jobs:
 
     strategy:
       matrix:
-        os: [ubuntu-latest, macos-latest, windows-latest]
+        os: [ubuntu-latest, macos-10.15, windows-latest]  # macos-latest does not have py3.6
         python-version: [3.6, 3.7, 3.8]
         requirements: [requirements.txt]
         include: