我是新来的网络刮擦,并试图熟悉气象标记库.我有以下数据集:
df = pd.DataFrame({
'postal code': [11, 12, 13],
'latitude': [40.7128, 34.0522, 51.5074],
'longitude': [-74.0060, -118.2437, -0.1278]
})
我想要做的是检索这些位置从01.01.2022到31.12.2022期间的每日最低和最高温度.我正在try 以下代码:
# Set time period
start = datetime(2022, 1, 1)
end = datetime(2022, 12, 31)
# Create points for locations
df['point'] = df.apply(lambda x: Point(x['latitude'], x['longitude'], 70),
axis=1)
# Get daily data for 2022
data = df.apply(lambda x: Daily(x['point'], start, end),
axis=1)
data = data.fetch()
但是,我收到以下错误:AttributeError:‘Series’对象没有‘Fetch’属性