diff --git a/rdtools/availability.py b/rdtools/availability.py index 144c5ed8..6ac74fcf 100644 --- a/rdtools/availability.py +++ b/rdtools/availability.py @@ -536,6 +536,11 @@ def _combine_losses(self, rollup_period="ME"): The period on which to roll up losses and calculate availability. """ + # Allow pandas < 2.0 to use 'M' as an alias for MonthEnd + # https://pandas.pydata.org/docs/whatsnew/v2.2.0.html#deprecate-aliases-m-q-y-etc-in-favour-of-me-qe-ye-etc-for-offsets + if rollup_period == "ME": + rollup_period = pd.tseries.offsets.MonthEnd() + if ((self.loss_system > 0) & (self.loss_subsystem > 0)).any(): msg = ( 'Loss detected simultaneously at both system and subsystem ' diff --git a/requirements-min.txt b/requirements-min.txt index d324f7c2..d44d3c0c 100644 --- a/requirements-min.txt +++ b/requirements-min.txt @@ -1,6 +1,6 @@ matplotlib==3.5.3 numpy==1.22.4 -pandas==1.5.3 +pandas==1.4.4 statsmodels==0.13.5 scipy==1.8.1 h5py==3.7.0 diff --git a/setup.py b/setup.py index 26231524..0e8f3ab6 100755 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ INSTALL_REQUIRES = [ "matplotlib >= 3.5.3", "numpy >= 1.22.4", - "pandas >= 1.5.3", + "pandas >= 1.4.4", "statsmodels >= 0.13.5", "scipy >= 1.8.1", "h5py >= 3.7.0",