text_html_output_1.png
import matplotlib.pyplot as plt
import seaborn as sns
engagement_data.rename(columns={'lp_id': 'LP ID'}, inplace=True)
merged = pd.merge(engagement_data, product_data, on='LP ID')
m = merged.groupby('Product Name')['engagement_index'].sum().sort_values(ascending=False).head(10)
plt.figure(figsize=(15, 6))
plt.bar(m.index, m.values, color=['#6930c3', '#5e60ce', '#0096c7', '#48cae4', '#ade8f4', '#ff7f51', '#ff9b54', '#ffbf69'])
plt.xlabel('Product Name')
plt.xticks(rotation=90)
plt.ylabel('Total page-load per 1000 students')
plt.title('Top 10 products with number of page-load per 1000 students')