Skip to content

Error when running 10_DSU_and_flexibility #619

@igarizio

Description

@igarizio

When running this example (10_DSU_and_flexibility) the code fails in the section "cleaning dispatch data from the simulation to feed it to the PyPSA network". The actual line that fails is (the next cell contains the same problem):
redisp_p_set = redisp_p_set.drop(columns=["demand_EOM1", "demand_EOM2"])

KeyError: "['demand_EOM1', 'demand_EOM2'] not found in axis"

I think this is just because the previous line creates an empty dataframe:

redispatches = market_dispatch_total[
    market_dispatch_total["market_id"].str.contains("redispatch", case=False, na=False)
]

Is it possible that market_dispatch_total["market_id"] should be market_dispatch_total["simulation"]?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions