docs: def _import_data(self, import_header_only=False):
          """Import data from an epw file.
  
          Hourly data will be saved in self.data and the various header data
          will be saved in the properties above.
          """
          # perform checks on the file before opening it.
          assert os.path.isfile(self._file_path), 'Cannot find an epw file at {}'.format(
              self._file_path)
          assert self._file_path.lower().endswith('epw'), '{} is not an .epw file. \n' \
              'It does not possess the .epw file extension.'.format(self._file_path)
  
          with open(self._file_path, readmode) as epwin:
              line = epwin.readline()
              original_header_load = bool(self._is_header_loaded)
  
              if not self._is_header_loaded:
                  # import location data
                  # first line has location data - Here is an example
                  # LOCATION,Denver Golden Nr,CO,USA,TMY3,724666,39.74,-105.18,-7.0,1829.0
                  location_data = line.strip().split(',')
                  self._location = Location()
                  self._location.city = location_data[1].replace('\\', ' ') \
                      .replace('/', ' ')
                  self._location.state = location_data[2]
                  self._location.country = location_data[3]
                  self._location.source = location_data[4]
                  self._location.station_id = location_data[5]
                  self._location.latitude = location_data[6]
                  self._location.longitude = location_data[7]
                  self._location.time_zone = location_data[8]
                  self._location.elevation = location_data[9]
  
                  # asemble a dictionary of metadata
                  self._metadata = {
                      'source': self._location.source,
                      'country': self._location.country,
                      'city': self._location.city
                  }
  
                  self._header = [line] + [epwin.readline() for i in xrange(7)]
  
                  # parse the heating, cooling and extreme design conditions.
                  dday_data = self._header[1].strip().split(',')
                  if len(dday_data) >= 2 and int(dday_data[1]) == 1:
                      if dday_data[4] == 'Heating':
                          for key, val in zip(DesignDay.heating_keys, dday_data[5:20]):
                              self._heating_dict[key] = val
                      if dday_data[20] == 'Cooling':
                          for key, val in zip(DesignDay.cooling_keys, dday_data[21:53]):
                              self._cooling_dict[key] = val
                      if dday_data[53] == 'Extremes':
                          for key, val in zip(DesignDay.extreme_keys, dday_data[54:70]):
                              self._extremes_dict[key] = val
  
                  # parse typical and extreme periods into analysis periods.
                  week_data = self._header[2].split(',')
                  num_weeks = int(week_data[1]) if len(week_data) >= 2 else 0
                  st_ind = 2
                  for i in xrange(num_weeks):
                      week_dat = week_data[st_ind:st_ind + 4]
                      st_ind += 4
                      st = [int(num) for num in week_dat[2].split('/')]
                      end = [int(num) for num in week_dat[3].split('/')]
                      if len(st) == 3:
                          a_per = AnalysisPeriod(st[1], st[2], 0, end[1], end[2], 23)
                      elif len(st) == 2:
                          a_per = AnalysisPeriod(st[0], st[1], 0, end[0], end[1], 23)
                      if 'Max' in week_dat[0] and week_dat[1] == 'Extreme':
                          self._extreme_hot_weeks[week_dat[0]] = a_per
                      elif 'Min' in week_dat[0] and week_dat[1] == 'Extreme':
                          self._extreme_cold_weeks[week_dat[0]] = a_per
                      elif week_dat[1] == 'Typical':
                          self._typical_weeks[week_dat[0]] = a_per
  
                  # parse the monthly ground temperatures in the header.
                  grnd_data = self._header[3].strip().split(',')
                  num_depths = int(grnd_data[1]) if len(grnd_data) >= 2 else 0
                  st_ind = 2
                  for i in xrange(num_depths):
                      header_meta = dict(self._metadata)  # copying the metadata dictionary
                      header_meta['depth'] = float(grnd_data[st_ind])
                      header_meta['soil conductivity'] = grnd_data[st_ind + 1]
                      header_meta['soil density'] = grnd_data[st_ind + 2]
                      header_meta['soil specific heat'] = grnd_data[st_ind + 3]
                      grnd_header = Header(temperature.GroundTemperature(), 'C',
                                           AnalysisPeriod(), header_meta)
                      grnd_vlas = [float(x) for x in grnd_data[st_ind + 4: st_ind + 16]]
                      self._monthly_ground_temps[float(grnd_data[st_ind])] = \
                          MonthlyCollection(grnd_header, grnd_vlas, list(xrange(12)))
                      st_ind += 16
  
                  # parse leap year, daylight savings and comments.
                  leap_dl_sav = self._header[4].strip().split(',')
                  self._is_leap_year = True if leap_dl_sav[1] == 'Yes' else False
                  self.daylight_savings_start = leap_dl_sav[2]
                  self.daylight_savings_end = leap_dl_sav[3]
                  comments_1 = self._header[5].strip().split(',')
                  if len(comments_1) > 0:
                      self.comments_1 = ','.join(comments_1[1:])
                  comments_2 = self._header[6].strip().split(',')
                  if len(comments_2) > 0:
                      self.comments_2 = ','.join(comments_2[1:])
  
                  self._is_header_loaded = True
  
              if import_header_only:
                  return
  
              # read first line of data to overwrite the number of fields
              if original_header_load is True:
                  for i in xrange(7):
                      epwin.readline()
              line = epwin.readline()
              self._num_of_fields = min(len(line.strip().split(',')), 35)
  
              # create an annual analysis period
              analysis_period = AnalysisPeriod(is_leap_year=self.is_leap_year)
  
              # create headers and an empty list for each field in epw file
              headers = []
              for field_number in xrange(self._num_of_fields):
                  field = EPWFields.field_by_number(field_number)
                  header = Header(data_type=field.name, unit=field.unit,
                                  analysis_period=analysis_period,
                                  metadata=dict(self._metadata))
                  headers.append(header)
                  self._data.append([])
  
              # collect hourly data
              while line:
                  data = line.strip().split(',')
  
                  for field_number in xrange(self._num_of_fields):
                      value_type = EPWFields.field_by_number(field_number).value_type
                      try:
                          value = value_type(data[field_number])
                      except ValueError as e:
                          # failed to convert the value for the specific TypeError
                          if value_type != int:
                              raise ValueError(e)
                          value = int(round(float(data[field_number])))
  
                      self._data[field_number].append(value)
  
                  line = epwin.readline()
  
              # if the first value is at 1 AM, move last item to start position
              for field_number in xrange(self._num_of_fields):
                  point_in_time = headers[field_number].data_type.point_in_time
                  if point_in_time is True:
                      # move the last hour to first position
                      last_hour = self._data[field_number].pop()
                      self._data[field_number].insert(0, last_hour)
  
              # finally, build the data collection objects from the headers and data
              for i in xrange(self._num_of_fields):
                  self._data[i] = HourlyContinuousCollection(headers[i], self._data[i])
  
              self._is_data_loaded = True