preheat_open.loadable_types.ElectricityPrices

class preheat_open.loadable_types.ElectricityPrices(data=<factory>, tariff_included=None, vat_included=None)

Bases: LoadableDataType

Represents electricity prices.

Variables:
  • data (list[ElectricityPriceItem]) – A list of electricity price items.

  • tariff_included (bool) – Indicates if the tariff is included in the prices.

  • vat_included (bool) – Indicates if the VAT is included in the prices.

  • unit (Unit) – The unit of the electricity prices.

__init__(data=<factory>, tariff_included=None, vat_included=None)

Methods

__init__([data, tariff_included, vat_included])

add_data(data)

Adds data to the loaded data.

get_data(date_range)

Retrieves data for the specified date range.

to_frame()

Converts the electricity prices to a pandas DataFrame.

Attributes

tariff_included

vat_included

data

add_data(data)

Adds data to the loaded data.

Parameters:

data (Any) – The data to add.

Return type:

None

get_data(date_range)

Retrieves data for the specified date range.

Parameters:

date_range (DateRange) – The date range for which to retrieve data.

Returns:

The data for the specified date range.

Return type:

Any

to_frame()

Converts the electricity prices to a pandas DataFrame.

Returns:

A DataFrame of the electricity prices.

Return type:

pd.DataFrame