hpipy.period_table.PeriodTable.create_period_table#

PeriodTable.create_period_table(date, periodicity=None, nbr_periods=None, freq=None, start=None, min_date=None, max_date=None, adj_type='move', **kwargs)[source]#

Create a period table from a transaction dataframe.

Parameters:
  • date (str) – Date field.

  • periodicity (str | None, optional) – Periodicity of the table. Defaults to None.

  • nbr_periods (int | None, optional) – Number of periods (only used if periodicity is “equalsample”). Defaults to None.

  • freq (int | None, optional) – Frequency in days (only used if periodicity is “equalfreq”). Defaults to None.

  • start (str | None, optional) – Starting position (only used if periodicity is “equalfreq”). One of “first” or “last”. Defaults to None.

  • min_date (str | None, optional) – Minimum date. Defaults to None.

  • max_date (str | None, optional) – Maximum dare. Defaults to None.

  • adj_type (str | None, optional) – Adjustment type. Defaults to “move”.

  • **kwargs – Additional keyword arguments.

Returns:

Period table.

Return type:

Self