breos.weather.preload_weather_by_year#

breos.weather.preload_weather_by_year(csv_file_path, target_year=2025)[source]#

Pre-load weather CSV once and split into per-year DataFrames.

Each year’s dates are remapped to target_year so the resulting DataFrames can be used directly in simulation (same datetime grid as select_random_year_and_replace_datetime would produce).

Parameters:
  • csv_file_path (str) – Path to the multi-year weather CSV

  • target_year (int) – Calendar year to remap all dates to

Return type:

Dict[int, DataFrame]

Returns:

Dict mapping original year → DataFrame with target-year dates, indexed by ‘date’