BUG: Do not backfill but drop rows with N/A in them.

This commit is contained in:
Thomas Wiecki
2012-12-06 15:52:50 -05:00
parent a14d702a0d
commit c46e09f52a
+1 -6
View File
@@ -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