Skip to content

innovate.scenario_comparisons

All current Python definitions

View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4

def scenario_comparisons(response: dict[str, Any]) -> pl.DataFrame: ...

Tabulate pair and ensemble comparisons from a scenario-grid envelope.

  • response: Complete successful grid envelope containing comparisons under result. Individual comparison errors may still be present.

Rows in input order with zero-based comparison_index, kind (pair or ensemble), successful and comparison_json. Nested outcomes and errors remain in the JSON column.

  • ValueError: If the envelope or comparison shape is invalid, native IPC conversion fails, or JSON values are non-finite or circular.
  • TypeError: If response values are not JSON-compatible.
  • polars.exceptions.PolarsError: If the produced IPC cannot be read.