Would be something like this
class PandasDirectData_NumPyLines(feed.DataBase): params = ( ('datetime', 0), ('open', 1), ('high', 2), ('low', 3), ('close', 4), ('volume', 5), ('openinterest', 6), ) datafields = [ 'datetime', 'open', 'high', 'low', 'close', 'volume', 'openinterest' ] def start(self): super(PandasDirectData_NumPyLines, self).start() self._df = self.p.dataname def preload(self): # Set the standard datafields - except for datetime for datafield in self.datafields[1:]: # get the column index colidx = getattr(self.params, datafield) if colidx < 0: # column not present -- skip continue l = getattr(self.lines, datafield) l.array = self._df.iloc[:, colidx] field0 = self.datafields[0] dts = pd.to_datetime(self.index) getattr(self.l, field0).array = dts.apply(date2num) self._last() self.home()Where datetime is directly taken from the index. The default column offset for the other fields is probably 1-off because of it, but it can luckily be configured