annular.utils

Functions

read_csv_with_utc_timestamps(→ pandas.DataFrame)

Load a CSV file, using column 0 as index, and converting the index to UTC timestamps.

patch_expected_price(→ list[float])

Create a list of expected prices.

Module Contents

annular.utils.read_csv_with_utc_timestamps(path: pathlib.Path | str) pandas.DataFrame[source]

Load a CSV file, using column 0 as index, and converting the index to UTC timestamps.

Parameters:

path – Path to the CSV file.

Returns:

DataFrame of the CSV file with index as UTC timestamps.

annular.utils.patch_expected_price(base_forecast: pandas.DataFrame, horizon: pandas.Index, forecast: pandas.DataFrame) list[float][source]

Create a list of expected prices.

For the specified horizon, replaces the base forecast with the given forecast.

Parameters:
  • base_forecast – The base forecast.

  • horizon – Time horizon to use.

  • forecast – Dataframe with to-be-used forecast.

Returns:

A list of expected prices.