Skip to content

Commit d964068

Browse files
committed
Allow include_data parameter for indexset.tabulate()
1 parent 92d56a9 commit d964068

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ixmp4/core/optimization/indexset.py

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from datetime import datetime
22
from typing import ClassVar
33

4+
import pandas as pd
5+
46
from ixmp4.core.base import BaseModelFacade
57
from ixmp4.data.abstract import Docs as DocsModel
68
from ixmp4.data.abstract import IndexSet as IndexSetModel
@@ -79,3 +81,10 @@ def __init__(self, *args, **kwargs) -> None:
7981
super().__init__(*args, **kwargs)
8082
self._backend_repository = self.backend.optimization.indexsets
8183
self._model_type = IndexSet
84+
85+
def tabulate(
86+
self, name: str | None = None, include_data: bool = False
87+
) -> pd.DataFrame:
88+
return self._backend_repository.tabulate(
89+
run_id=self._run.id, name=name, include_data=include_data
90+
)

0 commit comments

Comments
 (0)