.series_generator


function: create_series_obj()

create_series_obj(value, default_type=None) SeriesBase | IndicatorSeriesBase | None[source]

Create an instance descended from SeriesBase or IndicatorSeriesBase.

Parameters:
  • value – The input that should be de-serialized to a SeriesBase or IndicatorSeriesBase instance. Expected to be either a SeriesBase or IndicatorSeriesBase instance, a dict, or a JSON str.

  • default_type (str or None) – The default series type to apply if not specified in value. Defaults to None

Returns:

A SeriesBase (descendant) instance or IndicatorSeriesBase (descendant) instance

Return type:

SeriesBase or IndicatorSeriesBase or None