

def load_from_cache(self):
    try:
        with open(self.cache_filename, 'r') as f:
            data = json.load(f)
    except IOError:
        return
    except ValueError:
        self.clear_cache()
        return
    index = pd.to_datetime([d[0] for d in data], format=self.cache_date_format)
    values = [d[1] for d in data]
    self.tempC = pd.Series(values, index=index, dtype=float).sort_index().resample(self.freq).mean()

dataset/ETHPy150Open impactlab/eemeter/eemeter/weather.py CachedWeatherSourceBase.load_from_cache/original