From c46e09f52a84184760377174aaa7efd9d13c2ad8 Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Thu, 6 Dec 2012 15:52:50 -0500 Subject: [PATCH] BUG: Do not backfill but drop rows with N/A in them. --- zipline/transforms/utils.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/zipline/transforms/utils.py b/zipline/transforms/utils.py index 9b9bc13e..c65644ca 100644 --- a/zipline/transforms/utils.py +++ b/zipline/transforms/utils.py @@ -433,15 +433,10 @@ class BatchTransform(EventWindow): # of multiple stocks. E.g. we may be missing # minute data because of illiquidity of one stock data = data.fillna(method='ffill') - # Since we already forward filled, this can only - # fill the first value if it was missing. - # It's not wise to drop a complete column via dropna()) - # because of one missing value. - data = data.fillna(method='bfill') # Drop any empty rows after the fill. # This will drop a leading row of N/A - data = data.dropna() + data = data.dropna(axis=1) return data