Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- histPanel = web.DataReader(STOCKS_PREDICT, 'iex', startDate, endDate)
- # Cleanse data: remove dates where there is NaN and 0
- for item, df in histPanel.iteritems():
- for minor, ts in df.iteritems():
- for major, value in ts.iteritems():
- if float(value) == 0:
- histPanel[item][minor][major] = 'NaN'
- histPanel = histPanel.dropna(axis=1, how='any')
- return histPanel
Add Comment
Please, Sign In to add comment