mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-30 17:05:35 +08:00
38e8d5214d
Limited use of `pandas` data structures in both `HistoryContainer` and `RollingPanel`. Where possible, methods were amended to return raw `ndarrays` with the indexing logic done separately. This allows us to cut down the number of times pandas objects are created both as returns and intermediate values. The separation of indexing from data access allowed us to minimize the times we’d make use of pandas indexes. This required that that certain methods like `NDFrame.ffill` be replaced with versions that work with `ndarrays`. Some of this was done via straight numpy methods and others by access pandas internal machinery. Outside of allowing us to use faster ndarrays, many of these function provided speedups over their pandas counterparts as we didn’t require the extra features like handling multiple dtypes. i.e. np.isnan is faster than pd.isnull, but only works with certain dtypes.