iode.Period.difference
- Period.difference(other: Self) int[source]
Number of sub periods between two periods. The two periods must have the same periodicity.
- Parameters:
- other: Period
- Returns:
- int
Examples
>>> from iode import Period >>> period = Period(2000, 'Q', 1) >>> period_2 = Period(2001, 'Q', 3) >>> period.difference(period_2) -6 >>> period_2.difference(period) 6