diff --git a/CHANGELOG.rst b/CHANGELOG.rst index edb7af3d..4ebb5bb9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,10 @@ Changelog ========= +(Development) Version 1.1.3 +=========================== +- Lock pandas to 2.1.4 or later + Version 1.1.2 ============= - Update zenodo metadata for JOSS diff --git a/docs/requirements.txt b/docs/requirements.txt index 6b659fb8..335ad615 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -4,7 +4,7 @@ flatten_dict Jinja2<3.1 networkx openpyxl -pandas>=1.1,<2.1 +pandas>=2.1.4 pydantic>=2 pydot pyyaml diff --git a/setup.cfg b/setup.cfg index 7fbcbb43..50272515 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,7 +47,7 @@ install_requires = xlrd pyyaml pydot - pandas>=1.1,<2.1 + pandas>=2.1.4 Amply>=0.1.6 networkx flatten_dict diff --git a/src/otoole/input.py b/src/otoole/input.py index b3c979c7..210647a2 100644 --- a/src/otoole/input.py +++ b/src/otoole/input.py @@ -341,8 +341,11 @@ def _expand_defaults( df_default["VALUE"] = default_values[name] # combine result and default value dataframe - df = pd.concat([data, df_default]) - df = df[~df.index.duplicated(keep="first")] + if not data.empty: + df = pd.concat([data, df_default]) + df = df[~df.index.duplicated(keep="first")] + else: + df = df_default df = df.sort_index() output[name] = df diff --git a/tests/test_input.py b/tests/test_input.py index 292e4309..e9a7b148 100644 --- a/tests/test_input.py +++ b/tests/test_input.py @@ -265,7 +265,7 @@ def result_data(region): input_data_single_index_empty(region), ] parameter_test_data_ids = [ - "multi_index_no_defaluts", + "multi_index_no_defaults", "multi_index", "multi_index_empty", "single_index",