Skip to content

Commit

Permalink
Allow include_data parameter for indexset.tabulate()
Browse files Browse the repository at this point in the history
  • Loading branch information
glatterf42 committed Dec 19, 2024
1 parent 4500349 commit 9132e59
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ixmp4/core/optimization/indexset.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

# TODO Import this from typing when dropping Python 3.11

import pandas as pd

from ixmp4.core.base import BaseModelFacade
from ixmp4.data.abstract import Docs as DocsModel
from ixmp4.data.abstract import IndexSet as IndexSetModel
Expand Down Expand Up @@ -87,3 +89,10 @@ def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
self._backend_repository = self.backend.optimization.indexsets
self._model_type = IndexSet

def tabulate(
self, name: str | None = None, include_data: bool = False
) -> pd.DataFrame:
return self._backend_repository.tabulate(
run_id=self._run.id, name=name, include_data=include_data
)

0 comments on commit 9132e59

Please sign in to comment.