bsrn.io.crs.fetch_crs_hf#
- bsrn.io.crs.fetch_crs_hf(index, station_code)[source]#
Fetch CRS from Hugging Face and return inputs aligned to target index. 从 Hugging Face 获取 CRS 并返回对齐到目标索引的输入。
- Parameters:
index (pd.DatetimeIndex) – Target time index to align CRS outputs to. 需要对齐的目标时间索引。
station_code (str) – BSRN station code (e.g., “QIQ”). BSRN 站点代码(如 “QIQ”)。
- Returns:
aligned – CRS inputs reindexed to index with columns ghi_crs, bni_crs, dhi_crs. 重新索引到 index 的 CRS 输入,含 ghi_crs, bni_crs, dhi_crs 列。
- Return type:
pd.DataFrame
- Raises:
ValueError – If
indexis not aDatetimeIndexor is empty.index非 DatetimeIndex 或为空时。FileNotFoundError – From Hugging Face fetch helpers when a monthly parquet is unavailable. 月度 parquet 在 Hub 上不可用时的底层抛出。