iode.Period.to_float

Period.to_float(self) float

Returns a numerical representation of the period.

Returns:
float

Examples

>>> from iode import Period
>>> period = Period(2000, 'Q', 1)
>>> period.to_float()
2000.0
>>> period = Period(2000, 'Q', 3)
>>> period.to_float()
2000.5