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: Filter the timestamp series with filter series by using element-wise AND operation of the two series.
  
  Parameters
  ----------
  timestamp_series : pd.Series
      the series of bool value indicating existing time.
  filter_series : pd.Series
      the series of bool value indicating filter feature.
  
  Returns
  ----------
  pd.Series
      the series of bool value indicating whether the date satisfies the filter condition and exists in target timestamp.
docstr_tok: ["Filter","the","timestamp","series","with","filter","series","by","using","element-wise","AND","operation","of","the","two","series",".","Parameters","--","--","--","--","--","timestamp_series",":","pd.Series","the","series","of","bool","value","indicating","existing","time",".","filter_series",":","pd.Series","the","series","of","bool","value","indicating","filter","feature",".","Returns","--","--","--","--","--","pd.Series","the","series","of","bool","value","indicating","whether","the","date","satisfies","the","filter","condition","and","exists","in","target","timestamp","."]
code: def _filterSeries(self, timestamp_series, filter_series):
      """Filter the timestamp series with filter series by using element-wise AND operation of the two series.
  
      Parameters
      ----------
      timestamp_series : pd.Series
          the series of bool value indicating existing time.
      filter_series : pd.Series
          the series of bool value indicating filter feature.
  
      Returns
      ----------
      pd.Series
          the series of bool value indicating whether the date satisfies the filter condition and exists in target timestamp.
      """
      fstart, fend = (
          list(filter_series.keys())[0],
          list(filter_series.keys())[-1],
      )
      filter_series = filter_series.astype(
          "bool"
      )  # Make sure the filter_series is boolean
      timestamp_series[fstart:fend] = (
          timestamp_series[fstart:fend] & filter_series
      )
      return timestamp_series
  
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 4 for calling the SeriesDFilter obj's underlying member method code with example usage: obj._filterSeries(timestamp_series, filter_series) and returns: timestamp_series