attach_weather#

popo.network.attach_weather(df, weather_path, columns=None, timestamp_column='timestamp')#

Join weather columns onto a result frame, for use as forecasting inputs.

Parameters:
  • df (DataFrame) – Result frame carrying a timestamp_column, typically the concatenated output of a penetration sweep.

  • weather_path (Path) – Parquet file carrying timestamp_column and columns, at any resolution.

  • columns (list[str] | None) – Weather columns to join; defaults to irradiance and temperature, the two that drive rooftop PV.

  • timestamp_column (str) – Column carrying the timestamp, present in both df and the weather record.

Return type:

DataFrame

Returns:

df with columns joined on, forward/backward filled across any gap the interpolation could not close.