pivot_sources
Turn one anchored row per source into one row per subject.
Methods read a subject at a time: the forecast, the consensus and, when it exists, the actual, side by side. The long format is what callers hold and what anchoring consumes; this is the shape a method sees.
Parameters
| anchored |
pd.DataFrame |
One row per subject and source, as anchoring returns. |
required |
Returns
|
pd.DataFrame |
One row per subject, with a value column per source and suffixed known_at, dispersion and estimate_count columns when present. |
Raises
|
PanelError |
The same subject and source appears more than once, or source names collide with identifiers or generated columns. |