Skip to content

Commit

Permalink
Drop belief_time, source and cumulative_probability
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
  • Loading branch information
victorgarcia98 committed Apr 24, 2024
1 parent 031d6d6 commit 24f5e32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions flexmeasures/data/models/reporting/pandas_reporter.py
Expand Up @@ -43,6 +43,8 @@ def fetch_data(
Fetches the time_beliefs from the database
"""

droplevels = self._config.get("droplevels", False)

self.data = {}
for input_search_parameters in input:
_input_search_parameters = input_search_parameters.copy()
Expand Down Expand Up @@ -71,6 +73,9 @@ def fetch_data(
for source in bdf.sources.unique():
self.data[f"source_{source.id}"] = source

if droplevels:
bdf = bdf.droplevel([1,2,3])

# store BeliefsDataFrame as local variable
self.data[name] = bdf

Expand Down
2 changes: 2 additions & 0 deletions flexmeasures/data/schemas/reporting/pandas_reporter.py
Expand Up @@ -88,6 +88,8 @@ class PandasReporterConfigSchema(ReporterConfigSchema):
)
transformations = fields.List(fields.Nested(PandasMethodCall()), required=True)

droplevels = fields.Bool(required=False, default=False)

@validates_schema
def validate_chaining(self, data, **kwargs):
"""
Expand Down

0 comments on commit 24f5e32

Please sign in to comment.