first_known
first_known(observations, *, key_columns, known_at_column=KNOWN_AT_COLUMN)
Keep the first-known observation per key, dropping every later revision.
The first report of a figure is the one a market could trade on. A later restatement is a different fact and must not displace it.
Parameters
| observations |
pd.DataFrame |
Point-in-time rows, possibly several per key. |
required |
| key_columns |
Sequence[str] |
Columns identifying one figure. |
required |
| known_at_column |
str |
Column holding when each row became knowable. |
KNOWN_AT_COLUMN |
Returns
|
pd.DataFrame |
One row per key: the one with the earliest known_at. |
Raises
|
PanelError |
A column is absent or known_at is not tz-aware UTC. |