fig, axes = plt.subplots(1, 3, figsize=(13, 4)) cols = ["revenue_usd", "units_sold", "return_rate_pct"] labels = ["Revenue (USD)", "Units Sold", "Return Rate (%)"] colors = ["#4a90d9", "#2ecc71", "#e67e22"] for ax, col, label, color in zip(axes, cols, labels, colors): ax.hist(df[col], bins=6, color=color, edgecolor="white", linewidth=0.8, alpha=0.85) mean_val = df[col].mean() median_val = df[col].median() ax.axvline(mean_val, color="#e74c3c", linestyle="--", linewidth=1.8, label="Mean") ax.axvline(median_val, color="black", linestyle="-.", linewidth=1.8, label="Median") skew_val = df[col].skew() ax.set_title(f"{label}\nskew = {skew_val:.3f}", fontsize=11, fontweight="bold") ax.legend(fontsize=9) plt.suptitle("Histograms with Mean vs Median — Detecting Skewness", fontsize=13, fontweight="bold", y=1.03) plt.tight_layout() plt.savefig("histograms_skewness.png", dpi=150) plt.show()