CustomDataset

CustomDataset#

class sigtech.framework.instruments.custom_dataset.CustomDataset

Baseclasses: FrameworkObject

A class representing a Economic series

property data_source_all: list[str]

Data sources of the instrument. :return: data source

description: str
property fields: list[str]

Returns the fields available

Returns:

the fields available

group_name: str
metadata: Optional[dict]
property name

Return name of the DataSet

property prime_field: str

The main history field we return by default

data_df(data_point: DataPoint = None, multi_index: bool = False, drop_nan_cols: bool = False, pretty_print=True) DataFrame

Return a DataFrame containing all data available for this object.

Parameters:
  • data_point – Optional data point used to load the object history.

  • multi_index – If set to True, rows are uniquely indexed by a multi index (if applicable). Default is False.

  • drop_nan_cols – If set to True, all-NaN columns are dropped. Default is False.

  • pretty_print – If set to True, formatting is added to columns names and data values. Rates will be represented as percentage number instead of decimal number (e.g. 3.5 instead of 0.035).

Returns:

pandas DataFrame.

get_series(fields: list[str] = None, date_index: bool = False, include_internal_id: bool = True) Union[Series, DataFrame] deprecated

Deprecated method to retrieve the time series available for this dataset. If the given field does not exist, an empty series will be returned.

Parameters:
  • fields – List of fields to be returned. Must be defined of the history fields (optional, default is None and all available fields are returned).

  • date_index – Set the index to the date column (optional, default is False).

  • include_internal_id – Include the internal identifier (optional, default is True).

Returns:

pandas Series.

group()

The group this instrument belongs to.