load_cleaned_exchange_rates
Documentation for eth_defi.currency_api.parquet.load_cleaned_exchange_rates function.
- load_cleaned_exchange_rates(source_path)
Read and clean all exchange-rate rows from an existing DuckDB database.
Uses DuckDB read-only mode and intentionally bypasses
CurrencyRateDatabase: that mutable storage class creates directories and may initialise schema. The returned frame is sorted by its logical key and has stable column order.- Parameters
source_path (pathlib.Path) – Existing raw currency API DuckDB database.
- Returns
Sanitised DataFrame with
date, currency,rate,sourceand naive-UTCwritten_atcolumns.- Raises
FileNotFoundError – If the source database does not exist.
ValueError – If source rows do not meet the consumer export contract.
- Return type