MCPcopy Index your code
hub / github.com/kernc/backtesting.py / shm2df

Method shm2df

backtesting/_util.py:330–337  ·  view source on GitHub ↗
(data_shm)

Source from the content-addressed store, hash-verified

328
329 @staticmethod
330 def shm2df(data_shm):
331 shm = [SharedMemory(name=name, create=False, track=False) for _, name, _, _ in data_shm]
332 df = pd.DataFrame({
333 col: SharedMemoryManager.shm2s(shm, shape, dtype)
334 for shm, (col, _, shape, dtype) in zip(shm, data_shm)})
335 df.set_index(SharedMemoryManager._DF_INDEX_COL, drop=True, inplace=True)
336 df.index.name = None
337 return df, shm

Callers 2

_mp_taskMethod · 0.80
_mp_task_runMethod · 0.80

Calls 2

SharedMemoryClass · 0.85
shm2sMethod · 0.80

Tested by 1

_mp_taskMethod · 0.64