set_country_initial_debt()

Set the initial debt-to-GDP ratios for countries in the profile table.

Usage

set_country_initial_debt(
    ctx,
    records,
    *,
    strict=True,
    empty_measure="write",
)

Updates the initial debt-to-GDP values for the selected countries in the Tiny-DSA country profile lookup table. Each record matches a row in the country profile table by the COUNTRY field; the OBS_VALUE is written to the corresponding initial debt cell.

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 (None or float NaN after DataFrame coercion). “write” (default) passes values through; “skip” drops them; “error” raises. Empty key fields always raise. Required record fields: - COUNTRY: Country name as listed in the country profile table. - OBS_VALUE: The initial debt-to-GDP ratio, expressed as a percentage of GDP. Optional record fields: - INDICATOR: The economic indicator that the observation value represents. If supplied, expected value: “initial_debt_to_gdp”. - UNIT_MEASURE: Unit of measurement for the debt-to-GDP ratio. If supplied, expected value: “PC_GDP”.

Returns

None: None
Applies the input updates to ctx.

Source Binding

Workbook range: Inputs!B10:B12 Layout: series Value type: float

Examples

set_country_initial_debt(ctx, [ {‘COUNTRY’: ‘Borvelia’, ‘OBS_VALUE’: 60.0}, {‘COUNTRY’: ‘Litellia’, ‘OBS_VALUE’: 80.0},])

set_country_initial_debt(ctx, [60.0, 80.0])