MMMIDataWrapper.get_channel_spend#

MMMIDataWrapper.get_channel_spend()[source]#

Get channel spend data in monetary units.

If channel_spend exists in constant_data (set via cost_per_unit), returns it directly. Otherwise falls back to channel_data (backward compatible — assumed already in spend units).

Returns:
xr.DataArray

Channel spend values with dims (date, channel) or (date, *custom_dims, channel).

Raises:
ValueError

If neither channel_spend nor channel_data found in constant_data.