assign_vault_names
Documentation for eth_defi.research.wrangle_vault_prices.assign_vault_names function.
- assign_vault_names(rows, prices_df)
Map repaired vault names onto an already filtered price frame.
Name assignment is intentionally separate from
assign_unique_names()so denomination filtering can happen before the large row-wise mapping. The metadata repair loop still runs once per vault, while this operation is one vectorised lookup over the selected rows.Baseline (2026-09-22 production run): name and denormalised metadata were mapped before filtering 22,552,978 raw rows as part of the approximately 2m14s metadata/selection/sort segment. In the production-shaped rerun, the complete post-read metadata/filter stage (including this mapping, denomination membership and default-column expansion) took 12.54 seconds on 10,338,606 selected rows; the subsequent sort took 6.56 seconds. The name-only operation was not isolated, so no separate speed-up or stage RSS is claimed. The combined metadata/filter/sort segment, including the compact identity scan and Arrow read, was 24.58 seconds with 20.4 GiB peak process RSS.
- Parameters
rows (collections.abc.Mapping[eth_defi.vault.base.VaultSpec, eth_defi.vault.vaultdb.VaultRow]) – Vault metadata keyed by
VaultSpec.prices_df (pandas.DataFrame) – Filtered rows containing the canonical
idcolumn.
- Returns
The input frame with a filled
namecolumn.- Return type