Module macrobond_data_api.common.types.unified_series

Classes

class UnifiedSeries

Represents a Macrobond time series in the response from Api.get_unified_series().

Instance variables

var error_message : str

Contains an error message if UnifiedSerie.is_error is True.

var is_error : bool

True if there was an error downloading this entity. Entity.error_message will contain any error message.

var metadata : Metadata

The metadata of the series.

var name : str

The name of the requested series.

var values : Sequence[Optional[float]]

The values of the series.

Methods

def to_dict(self) ‑> Dict[str, Any]
class UnifiedSeriesDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)

Ancestors

  • builtins.dict

Class variables

var Dates : Sequence[datetime.datetime]
var Series : Sequence[Dict[str, Any]]
class UnifiedSeriesList

The response from Api.get_unified_series().

Ancestors

  • collections.abc.Sequence
  • collections.abc.Reversible
  • collections.abc.Collection
  • collections.abc.Sized
  • collections.abc.Iterable
  • collections.abc.Container
  • typing.Generic

Instance variables

var dates : Sequence[datetime.datetime]

The dates of the observations

var is_error : bool

True if any of the series has an error.

var series : Sequence[UnifiedSeries]

The list of series

Methods

def get_errors(self) ‑> Dict[str, str]
def to_dict(self) ‑> UnifiedSeriesDict
def to_pd_data_frame(self) ‑> DataFrame