(v: Any)
| 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 | |
| 104 | def _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) |
no outgoing calls
no test coverage detected