def filter_by_analysis_period(self, analysis_period):
self._check_analysis_period(analysis_period)<EOL>_filtered_data = self.filter_by_moys(analysis_period.moys)<EOL>_filtered_data.header._analysis_period = analysis_period<EOL>return _filtered_data<EOL>
Filter a Data Collection based on an analysis period.

Args:
   analysis period: A Ladybug analysis period

Return:
    A new Data Collection with filtered data