def _filter_by_pattern(self, pattern):
try:<EOL><INDENT>_len = len(pattern)<EOL><DEDENT>except TypeError:<EOL><INDENT>raise TypeError("<STR_LIT>".format(<EOL>type(pattern)))<EOL><DEDENT>_filt_values = [d for i, d in enumerate(self._values) if pattern[i % _len]]<EOL>_filt_datetimes = [d for i, d in enumerate(self.datetimes) if pattern[i % _len]]<EOL>return _filt_values, _filt_datetimes<EOL>
Filter the Filter the Data Collection based on a list of booleans.