text_plain_output_1.png
import pandas as pd

import pandas as pd

df_ = pd.read_csv('/kaggle/input/fast-food-marketing-campaign-ab-test/WA_Marketing-Campaign.csv')
df = df_.copy()

df.describe().T

df.groupby('Promotion')['Promotion'].count()

df_age_sales = df.groupby(['MarketID', 'LocationID']).agg({'AgeOfStore': 'mean', 'SalesInThousands': 'mean'})
df_age_sales

df.groupby(['MarketID', 'Promotion'])['SalesInThousands'].mean()

df_medium_week = df.groupby(['MarketSize', 'week', 'Promotion'])['SalesInThousands'].mean()
df_medium_week

df.groupby(['MarketSize', 'Promotion'])['SalesInThousands'].mean()

small_market = df[df['MarketSize'] == 'Small']
medium_market = df[df['MarketSize'] == 'Medium']
large_market = df[df['MarketSize'] == 'Large']

small_market.describe().T