iode.Sample

class iode.Sample(start_period: str | Period, end_period: str | Period = None)[source]

A sample represents the series of sub periods attached to the IODE variables or to the estimation process.

Parameters:
start_period: str or Period

First period of the sample. If str, it must be a valid period string (e.g. ‘1960Y1’).

end_period: str or Period

Last period of the sample. If str, it must be a valid period string (e.g. ‘2015Y1’).

Attributes:
start: str

First period of the sample.

end: str

Last period of the sample.

nb_periods: int

Total number of sub periods in the sample.

Methods

get_period_list(astype)

List of all periods of the sample.

index(period)

Position of the 'period' in the sample.

intersection(other_sample)

Compute the intersection between two samples.

from_cython_obj

Examples

>>> from iode import Sample
>>> Sample("1982Y1", "2020Y1")
Sample("1982Y1:2020Y1")
>>> Sample("1982Y1:2020Y1")
Sample("1982Y1:2020Y1")
__init__(start_period: str | Period, end_period: str | Period = None)[source]

Methods

__init__(start_period[, end_period])

from_cython_obj(obj)

get_period_list(astype)

List of all periods of the sample.

index(period)

Position of the 'period' in the sample.

intersection(other_sample)

Compute the intersection between two samples.

Attributes

end

nb_periods

periods

Return the list of periods.

start