Skip to content

hbsir.api.add_weight

Add sampling weights to the table.

Loads appropriate sample weights for each year in the table and merges them onto the table.

Weights for years prior to 1395 are loaded from external parquet data, while weights for 1395 onward come from the household_information table.

Parameters:

Name Type Description Default
table DataFrame

Input data table, containing a column of year values

required

Returns:

Name Type Description
table DataFrame

Input table with 'Weight' column added