annular.utils ============= .. py:module:: annular.utils Classes ------- .. autoapisummary:: annular.utils.Sense Functions --------- .. autoapisummary:: annular.utils.read_csv_with_utc_timestamps annular.utils.patch_expected_price annular.utils.negate_supply_bids_for_summarize annular.utils.silence_noisy_loggers Module Contents --------------- .. py:class:: Sense Bases: :py:obj:`enum.IntEnum` Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: DEMAND :value: 1 .. py:attribute:: SUPPLY :value: -1 .. py:function:: read_csv_with_utc_timestamps(path: pathlib.Path | str) -> pandas.DataFrame Load a CSV file, using column 0 as index, and converting the index to UTC timestamps. :param path: Path to the CSV file. :returns: DataFrame of the CSV file with index as UTC timestamps. .. py:function:: patch_expected_price(base_forecast: pandas.DataFrame, horizon: pandas.Index, forecast: pandas.DataFrame) -> list[float] Create a list of expected prices. For the specified horizon, replaces the base forecast with the given forecast. :param base_forecast: The base forecast. :param horizon: Time horizon to use. :param forecast: Dataframe with to-be-used forecast. :returns: A list of expected prices. .. py:function:: negate_supply_bids_for_summarize(bids: pandas.DataFrame) Negate supply bid quantities for correct summarization. :param bids: bid dataframe with all indexes. :returns: Dataframe with supply quantity negated and `sense` column removed. .. py:function:: silence_noisy_loggers() Silence logging of dependencies.