Skip to content

Commit

Permalink
pd.notnull -> pd.notna
Browse files Browse the repository at this point in the history
  • Loading branch information
brynpickering committed Sep 30, 2024
1 parent d024911 commit ccf0950
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/calliope/backend/expression_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ def as_array(self) -> xr.DataArray: # noqa: D102, override
evaluated = backend_interface._dataset[self.name]
except KeyError:
evaluated = xr.DataArray(self.name, attrs={"obj_type": "string"})
if "default" in evaluated.attrs and pd.notnull(evaluated.attrs["default"]):
if "default" in evaluated.attrs and pd.notna(evaluated.attrs["default"]):
evaluated = evaluated.fillna(evaluated.attrs["default"])

self.eval_attrs["references"].add(self.name)
Expand Down
2 changes: 1 addition & 1 deletion src/calliope/backend/gurobi_backend_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def _solve(

def verbose_strings(self) -> None: # noqa: D102, override
def __renamer(val, *idx, name: str, attr: str):
if pd.notnull(val):
if pd.notna(val):
new_obj_name = f"{name}[{', '.join(idx)}]"
setattr(val, attr, new_obj_name)

Expand Down
2 changes: 1 addition & 1 deletion src/calliope/backend/pyomo_backend_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def _solve( # noqa: D102, override

def verbose_strings(self) -> None: # noqa: D102, override
def __renamer(val, *idx):
if pd.notnull(val):
if pd.notna(val):
val.calliope_coords = idx

with self._datetime_as_string(self._dataset):
Expand Down

0 comments on commit ccf0950

Please sign in to comment.