class_docstr: Expression dynamic instrument filter
  
  Filter the instruments based on a certain expression.
  
  An expression rule indicating a certain feature field is required.
  
  Examples
  ----------
  - *basic features filter* : rule_expression = '$close/$open>5'
  - *cross-sectional features filter* : rule_expression = '$rank($close)<10'
  - *time-sequence features filter* : rule_expression = '$Ref($close, 3)>100'
class_docstr_tok: ["Expression","dynamic","instrument","filter","Filter","the","instruments","based","on","a","certain","expression",".","An","expression","rule","indicating","a","certain","feature","field","is","required",".","Examples","--","--","--","--","--","-","*","basic","features","filter","*",":","rule_expression","=","'","$","close\/","$","open",">","5'","-","*","cross-sectional","features","filter","*",":","rule_expression","=","'","$","rank","(","$","close",")","<","10'","-","*","time-sequence","features","filter","*",":","rule_expression","=","'","$","Ref","(","$","close",",","3",")",">","100","'"]
docstr: Init function for expression filter class
  
  Parameters
  ----------
  fstart_time: str
      filter the feature starting from this time.
  fend_time: str
      filter the feature ending by this time.
  rule_expression: str
      an input expression for the rule.
docstr_tok: ["Init","function","for","expression","filter","class","Parameters","--","--","--","--","--","fstart_time",":","str","filter","the","feature","starting","from","this","time",".","fend_time",":","str","filter","the","feature","ending","by","this","time",".","rule_expression",":","str","an","input","expression","for","the","rule","."]
code: def __init__(
      self,
      rule_expression,
      fstart_time=None,
      fend_time=None,
      keep=False,
  ):
      """Init function for expression filter class
  
      Parameters
      ----------
      fstart_time: str
          filter the feature starting from this time.
      fend_time: str
          filter the feature ending by this time.
      rule_expression: str
          an input expression for the rule.
      """
      super(ExpressionDFilter, self).__init__(
          fstart_time, fend_time, keep=keep
      )
      self.rule_expression = rule_expression
  
imports: from __future__ import print_function
  from abc import abstractmethod
  import re
  import pandas
  import numpy
  import abc
  from .data import Cal, DatasetD
label_desc: Use image node_id 1 to create a new ExpressionDFilter object from inherited base classes: SeriesDFilter with example: obj = ExpressionDFilter(rule_expression, fstart_time, fend_time, keep)