mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-28 15:38:11 +08:00
0a3a2f3653
When the dts and length of cols are mismatched the writer behaves in unintended ways. e.g. in a case where a consumer passed dts which had minutes with no trades removed, but regular (market minute for day) sized arrays for the data with `0`'s on minutes without trades, the non trade minutes from cols are written to slots in the output where a trade is intended. Protect against this misuse by checking that all lengths are equal when using the `write_cols` method. Make a separate `_write_cols` method for use by both `write_cols` and `write`, since the `write` method which takes a DataFrame has the matched input length enforced by the DataFrame.