MCPcopy Create free account
hub / github.com/Open-Quant/openquant / _normalize_column_name

Function _normalize_column_name

python/openquant/data.py:52–53  ·  view source on GitHub ↗
(name: str)

Source from the content-addressed store, hash-verified

50
51
52def _canonicalize_columns(df: pl.DataFrame) -> pl.DataFrame:
53 rename_map: dict[str, str] = {}
54 # An exact canonical column takes precedence even if its alias appears first.
55 # Otherwise both columns would be renamed to the same target.
56 used_targets = set(df.columns).intersection(CANONICAL_OHLCV_COLUMNS)

Callers 1

_canonicalize_columnsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected