class_docstr: Dynamic Instruments Filter Abstract class to filter a series of certain features
  
  Filters should provide parameters:
  
  - filter start time
  - filter end time
  - filter rule
  
  Override __init__ to assign a certain rule to filter the series.
  
  Override _getFilterSeries to use the rule to filter the series and get a dict of {inst => series}, or override filter_main for more advanced series filter rule
class_docstr_tok: ["Dynamic","Instruments","Filter","Abstract","class","to","filter","a","series","of","certain","features","Filters","should","provide","parameters",":","-","filter","start","time","-","filter","end","time","-","filter","rule","Override","__init__","to","assign","a","certain","rule","to","filter","the","series",".","Override","_getFilterSeries","to","use","the","rule","to","filter","the","series","and","get","a","dict","of","{","inst","=",">","series","}",",","or","override","filter_main","for","more","advanced","series","filter","rule"]
docstr: Init function for filter base class.
      Filter a set of instruments based on a certain rule within a certain period assigned by fstart_time and fend_time.
  
  Parameters
  ----------
  fstart_time: str
      the time for the filter rule to start filter the instruments.
  fend_time: str
      the time for the filter rule to stop filter the instruments.
  keep: bool
      whether to keep the instruments of which features don't exist in the filter time span.
docstr_tok: ["Init","function","for","filter","base","class",".","Filter","a","set","of","instruments","based","on","a","certain","rule","within","a","certain","period","assigned","by","fstart_time","and","fend_time",".","Parameters","--","--","--","--","--","fstart_time",":","str","the","time","for","the","filter","rule","to","start","filter","the","instruments",".","fend_time",":","str","the","time","for","the","filter","rule","to","stop","filter","the","instruments",".","keep",":","bool","whether","to","keep","the","instruments","of","which","features","do","n't","exist","in","the","filter","time","span","."]
code: def __init__(self, fstart_time=None, fend_time=None, keep=False):
      """Init function for filter base class.
          Filter a set of instruments based on a certain rule within a certain period assigned by fstart_time and fend_time.
  
      Parameters
      ----------
      fstart_time: str
          the time for the filter rule to start filter the instruments.
      fend_time: str
          the time for the filter rule to stop filter the instruments.
      keep: bool
          whether to keep the instruments of which features don't exist in the filter time span.
      """
      super(SeriesDFilter, self).__init__()
      self.filter_start_time = (
          pd.Timestamp(fstart_time) if fstart_time else None
      )
      self.filter_end_time = (
          pd.Timestamp(fend_time) if fend_time else None
      )
      self.keep = keep
  
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 SeriesDFilter object from inherited base classes: BaseDFilter with example: obj = SeriesDFilter(fstart_time, fend_time, keep)