set_primary_balance_baseline()
Set the baseline primary balance path for projection years 1 through 5.
Usage
set_primary_balance_baseline(
ctx, records, *, strict=True, empty_measure="write"
)Updates the primary balance baseline series with the provided records. Each record supplies a projection year (TIME_PERIOD) and its corresponding primary balance value (OBS_VALUE) for the baseline path.
Parameters
records: SeriesInput-
A list of records, a single record dict, a tidy pandas/polars DataFrame, or a 1-D iterable of measure values in key order.
empty_measure: EmptyMeasure = "write"-
How to treat rows with missing measure values (
Noneor float NaN after DataFrame coercion). “write” (default) passes values through; “skip” drops them; “error” raises. Empty key fields always raise. Required record fields: - TIME_PERIOD: Projection year index, from 1 to 5. - OBS_VALUE: Primary balance as a percent of GDP; positive values denote a surplus. Optional record fields: - INDICATOR: Series indicator identifier. If supplied, expected value: “primary_balance”. - UNIT_MEASURE: Unit of measure for the observation values. If supplied, expected value: “PC_GDP”.
Returns
None: None- Applies the input updates to ctx.
Source Binding
Workbook range: Inputs!C18:G18 Layout: series Value type: float
Examples
set_primary_balance_baseline(ctx, [ {‘TIME_PERIOD’: 1, ‘OBS_VALUE’: -1.0}, {‘TIME_PERIOD’: 2, ‘OBS_VALUE’: -0.5},])
set_primary_balance_baseline(ctx, [-1.0, -0.5])