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

Function test_to_polars_event_frame

python/tests/test_adapters_viz.py:25–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23def test_to_polars_event_frame():
24 df = openquant.adapters.to_polars_event_frame(
25 starts=["2024-01-01 09:30:00", "2024-01-01 09:35:00"],
26 ends=["2024-01-01 10:00:00", "2024-01-01 10:05:00"],
27 probs=[0.6, 0.55],
28 sides=[1.0, -1.0],
29 labels=[1, 0],
30 )
31 assert df.columns == ["start_ts", "end_ts", "prob", "side", "label"]
32 assert df.height == 2
33
34
35def test_to_polars_indicator_matrix():
36 ind = [[1, 0, 1], [0, 1, 1], [1, 1, 0]]
37 df = openquant.adapters.to_polars_indicator_matrix(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected