ایجاد اسکریپت خودکار تحلیل رفتار کاربران در فروشگاه لوازم الکترونیکی
این پرامپت به کاربران کمک میکند تا یک اسکریپت پایتنی خودکار برای تحلیل رفتار کاربران در وبسایتهای لوازم الکترونیکی طراحی کرده و گزارشهای بصری تولید کند.
role: data engineer. context: a CSV file with columns timestamp, user_id, page_url, event_type, duration representing user interaction logs of an electronics e‑commerce website. instruction: write a Python script that loads the CSV, computes daily active users, average session duration, top product categories by visits, and conversion rate, then creates an HTML report containing a summary table and charts (bar for category visits, line for daily active users) using matplotlib or seaborn. constraints: include clear function definitions and comments, output only the script code, no additional explanation, and ensure the script runs without external data files.