iode.Period.__float__

Period.__float__() float[source]

Returns a float representation of the period.

Returns:
float

Examples

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