Feature¶
Feature ¶
Assemble a single harmonized DataFrame for a table across countries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
table_name
|
str
|
The table to load (e.g. |
required |
trust_cache
|
bool
|
If True, read existing cached parquets without validation (fast).
Can be overridden per-call. Default |
False
|
Examples:
>>> import lsms_library as ll
>>> roster = ll.Feature('household_roster')
>>> roster.countries # which countries have this table
>>> df = roster(['Mali', 'Uganda']) # load specific countries
>>> df = roster() # load all available countries
>>> df = roster(trust_cache=True) # fast read from cache
countries
property
¶
Countries that declare this table in their data_scheme.yml.
columns
property
¶
Required columns from the global data_info.yml for this table.
__call__ ¶
Load and concatenate data across countries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
countries
|
list of str
|
Countries to include. Defaults to all available countries. |
None
|
trust_cache
|
bool
|
If True, read existing cached parquets without validation.
Defaults to the instance-level setting from |
None
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with a |