def filter_by_months_per_hour(self, months_per_hour):
_filt_values = []<EOL>_filt_datetimes = []<EOL>for i, d in enumerate(self.datetimes):<EOL><INDENT>if d in months_per_hour:<EOL><INDENT>_filt_datetimes.append(d)<EOL>_filt_values.append(self._values[i])<EOL><DEDENT><DEDENT>return MonthlyPerHourCollection(<EOL>self.header.duplicate(), _filt_values, _filt_datetimes)<EOL>
Filter the Data Collection based on a list of months per hour (as strings).

        Args:
           months_per_hour: A list of tuples representing months per hour.
               Each tuple should possess two values: the first is the month
               and the second is the hour. (eg. (12, 23) = December at 11 PM)

        Return:
            A new Data Collection with filtered data