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

Function _format_ts

python/openquant/data.py:99–104  ·  view source on GitHub ↗
(v: Any)

Source from the content-addressed store, hash-verified

97 # Normalize to UTC before dropping the zone to keep the canonical naive schema.
98 return pl.coalesce(
99 expr.str.strptime(utc_dtype, TS_FORMAT, strict=False),
100 inferred,
101 ).dt.replace_time_zone(None)
102
103
104def _cast_ohlcv_lf(df: pl.DataFrame) -> pl.LazyFrame:
105 """The canonical columns, parsed and cast, before rows with nulls are dropped."""
106 frame = _canonicalize_columns(df)
107 _validate_required_columns(frame)

Callers 1

_build_quality_reportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected