-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Context
Exporting the curves with the packer doesn't provide a useful dataframe as all types of hourly curves dataframes are concatenated together without a unique key. This makes it impossible to subset specific curves after export.
Steps to reproduce
See the following notebook snippet and resulting dataframe.
from pyetm.models import Session, Scenarios, ScenarioPacker
s1 = Session.load(1172446)
s2 = Session.load(1172447)
s3 = Session.load(1172450)
scenarios = Scenarios(items=[s1, s2, s3])
packer = ScenarioPacker()
packer.add(*scenarios)
exports = packer.exports()
exports
Proposed solution
Please add a (named) level to the multi index column that specifies the type of curve so that this curve type can be extracted. It would also be very useful if the curve type(s) to be exported can be added as an optional parameter in the exports call itself, e.g. packer.exports(curves=["electricity", "electricity_price"]). Furthermore you could consider offering the exported curves as a dictionary of dataframes instead of concatenating them all together into a single dataframe.