def filter_by_pattern(self, pattern):
_filt_values, _filt_datetimes = self._filter_by_pattern(pattern)<EOL>if self._enumeration is None:<EOL><INDENT>self._get_mutable_enumeration()<EOL><DEDENT>col_obj = self._enumeration['<STR_LIT>'][self._collection_type]<EOL>collection = col_obj(self.header.duplicate(), _filt_values, _filt_datetimes)<EOL>collection._validated_a_period = self._validated_a_period<EOL>return collection<EOL>
Filter the Data Collection based on a list of booleans.

        Args:
            pattern: A list of True/False values.  Typically, this is a list
                with a length matching the length of the Data Collections values
                but it can also be a pattern to be repeated over the Data Collection.

        Return:
            A new Data Collection with filtered data