From a7818f853a9709f4a15c97313da8a8c865764918 Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Thu, 6 Jun 2013 16:39:05 -0400 Subject: [PATCH] DOC: Add note about performance issue when updating. --- zipline/utils/data.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zipline/utils/data.py b/zipline/utils/data.py index 73b05570..b12fd367 100644 --- a/zipline/utils/data.py +++ b/zipline/utils/data.py @@ -65,8 +65,14 @@ class RollingPanel(object): new_buffer = self._create_buffer() # Copy old values we want to keep + # .update() is pretty slow. Ideally we would be using + # new_buffer.loc[non_nan_items, :, non_nan_cols] = + # but this triggers a bug in Pandas 0.11. Update + # this when 0.12 is released. + # https://github.com/pydata/pandas/issues/3777 new_buffer.update( self.buffer.loc[non_nan_items, :, non_nan_cols]) + self.buffer = new_buffer def add_frame(self, tick, frame):