def set_features(self, partition=1):
        """ Parses market data JSON for technical analysis indicators

        Args:
            partition: Int of how many dates to take into consideration
                when evaluating technical analysis indicators.

        Returns:
            Pandas DataFrame instance with columns as numpy.float32 features.
        """
        if len(self.json) < partition + 1:
            raise ValueError('Not enough dates for the specified partition size: {0}.  Try a smaller partition.'.format(partition))

        data = []
        for offset in range(len(self.json) - partition):
            json = self.json[offset : offset + partition]
            data.append(eval_features(json))
        return pd.DataFrame(data=data, dtype=np.float32)
def set_features ( self , partition = 1 ) : if len ( self . json ) < partition + 1 : raise ValueError ( 'Not enough dates for the specified partition size: {0}.  Try a smaller partition.' . format ( partition ) ) data = [ ] for offset in range ( len ( self . json ) - partition ) : json = self . json [ offset : offset + partition ] data . append ( eval_features ( json ) ) return pd . DataFrame ( data = data , dtype = np . float32 )
Parses market data JSON for technical analysis indicators

        Args:
            partition: Int of how many dates to take into consideration
                when evaluating technical analysis indicators.

        Returns:
            Pandas DataFrame instance with columns as numpy.float32 features.