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 Nov 27, 2024
1 parent 92d56a9 commit d964068
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
@@ -1,6 +1,8 @@
from datetime import datetime
from typing import ClassVar

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 @@ -79,3 +81,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 d964068

Please sign in to comment.