

def _load_data(self):
    data = self.client.get_tmy3_data(self.station, self.station_fallback)
    if (data is None):
        temps = [np.nan for _ in range((365 * 24))]
        index = [(datetime(1900, 1, 1) + timedelta(seconds=(data * 3600))) for i in range((365 * 24))]
    else:
        temps = [d['temp_C'] for d in data]
        index = [datetime(1900, d['dt'].month, d['dt'].day, d['dt'].hour) for d in data]
    self.tempC = pd.Series(temps, index=index, dtype=float).sort_index().resample('H').mean()
    self.save_to_cache()

dataset/ETHPy150Open impactlab/eemeter/eemeter/weather.py TMY3WeatherSource._load_data/VarMisuse@73/83 `i`->`data`