diff --git a/calliope/core.py b/calliope/core.py index bcb42ee10..cddd447c6 100644 --- a/calliope/core.py +++ b/calliope/core.py @@ -525,22 +525,23 @@ def get_carrier(self, y, direction, level=None, primary=False, all_carriers=Fals """ if y in self._sets['y_conversion_plus']: if level: # Either 2 or 3 - return self.get_option(y + '_'.join('.carrier', - direction, str(level))) - primary_carrier, all_carriers = self.get_cp_carriers(y, - direction=direction) + return self.get_option( + y + '_'.join('.carrier', direction, str(level)) + ) + primary_carrier, all_carriers = self.get_cp_carriers( + y, direction=direction) if primary: return primary_carrier if all_carriers: return all_carriers - - carrier = self.get_option( - y + '.carrier', default=y + '.carrier_' + direction - ) - if not carrier: # no carrier_in/carrier_out defined - return 'resource' else: - return carrier + carrier = self.get_option( + y + '.carrier', default=y + '.carrier_' + direction + ) + if not carrier: # no carrier_in/carrier_out defined + return 'resource' + else: + return carrier def get_weight(self, y): return self.get_option(y + '.stack_weight') diff --git a/requirements.yml b/requirements.yml index 9060fc206..d5c00f799 100644 --- a/requirements.yml +++ b/requirements.yml @@ -18,7 +18,7 @@ dependencies: - networkx - numexpr - numpy=1.12.1 - - pandas=0.20.2 + - pandas=0.19 - pyomo=5.2 - pytest - pytest-cov diff --git a/setup.py b/setup.py index ca2b9ccbb..bf5b14261 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ def find_calliope_package_data(): "netcdf4 >= 1.2.2", "numexpr >= 2.3.1", "numpy >= 1.12", - "pandas >= 0.20, < 0.21", + "pandas >= 0.19, < 0.20", "pyomo >= 5.2, < 5.3", "pyyaml >= 3.11", "xarray >= 0.9.5, < 0.10",