MMMSummaryFactory.channel_spend#

MMMSummaryFactory.channel_spend(output_format=None)[source]#

Create channel spend DataFrame (raw data, no HDI).

Returns the raw spend values per channel and date without any statistical aggregation.

Parameters:
output_format{“pandas”, “polars”}, optional

Output DataFrame format (default: uses factory default)

Returns:
pd.DataFrame or pl.DataFrame

DataFrame with columns:

  • date: Time index

  • channel: Channel name

  • channel_data: Spend value

Examples

>>> df = mmm.summary.channel_spend()
>>> df = mmm.summary.channel_spend(output_format="polars")