提问人:AffeFridolin 提问时间:3/27/2023 更新时间:3/27/2023 访问量:220
警告:从磁带库 meteostat 加载数据
Warning loading Data from library meteostat
问:
我需要一些大学项目的天气数据。 因此,我使用了库 meteostat,但是当我意识到我的 Python 代码时仍然有一个警告。无论如何,我得到了一个结果。 我该如何处理这种警告?
我的代码:
import meteostat as ms
import pandas as pd
import math
stations = ms.Stations()
stations = stations.region('DE')
stations = stations.fetch(sample = True)
stations = stations[stations['hourly_start'] < '1990-01-01']
stations = stations[stations['hourly_end'] >= '2020-12-31']
sum, counter, maxi, i = 0, 0, 0, 0
first_dates = {}
for station in stations['name']:
location = ms.Point(stations['latitude'][i], stations['longitude'][i])
Hourly = ms.Hourly(location, stations['hourly_start'][i], stations['hourly_end'][I])
df = Hourly.fetch()
starter = stations['hourly_start'][i]
for rr in df.prcp:
starter += pd.Timedelta(hours=1)
if(math.isnan(rr)!=True):
sum += rr
counter += 1
if(rr>maxi):
maxi = rr
if(counter == 1):
print(f"\n\nErster Niederschlagswert der Station {station} zur Zeit: {starter} : ", rr)
first_dates[station] = starter
i += 1
sum, counter, maxi = 0, 0, 0
输出如下所示: 警告:无法从 https://bulk.meteostat.net/v2/ 每小时/2017/10007.csv.gz 加载 ...
答: 暂无答案
评论