Python Sales EDA and Profitability Analysis

    by AMIN REDA

    1

    Clean and analyze sales data in Python: KPIs, discount and margin analysis, RFM customer segments, and an interactive Plotly dashboard.

    Free

    Security scanned

    Works with the AI Agents you already use

    About this skill

    A repeatable workflow for taking a raw orders dataset to findings the business can act on.

    1. Load and inspect. shape, dtypes, head, isna().sum(), duplicate count, and value counts for categorical columns. Note encoding problems when reading CSV (try utf-8, then latin-1).
    2. Clean.
      • Parse dates explicitly; if formats are mixed, parse each format separately and report how many rows each covered. Do not silently coerce to NaT.
      • Validate logic: ship date must not precede order date; quantities positive; discount between 0 and 1.
      • Handle missing values deliberately (drop, fill, or flag) and say which rule was used and why.
      • Remove exact duplicates; investigate near-duplicates before dropping.
    3. Engineer features. Processing/shipping time, order month and year, profit margin (profit / sales), discount buckets (for example 0, 0-10%, 10-20%, 20-30%, 30%+), customer order counts.
    4. KPIs. Choose about 5 to 7: total sales, total profit, overall margin, average order value, orders count, average processing time, return or loss-making order share. Define each KPI in one line.
    5. Profitability analysis.
      • Margin by region, category, sub-category, segment.
      • Profit versus discount bucket: share of loss-making orders and total loss per bucket. Report the threshold where losses dominate, as an observation from this dataset, not a universal rule.
      • Identify the biggest loss-making product groups.
    6. RFM segmentation. Recency (days since last order versus a reference date), Frequency (orders), Monetary (sales or profit). Score each 1 to 5 by quantiles, combine into segments such as Champions, Loyal, At Risk, Lost. Show segment sizes and revenue share.
    7. Visualize. Clear titles and axis labels, sorted bars, no 3D or pie overload. Use Seaborn or Matplotlib for static charts. For an interactive dashboard produce a single HTML file with Plotly (filters by year and region, KPI cards, key charts).
    8. Write findings. 5 to 8 bullets: what is true in the data, how big the effect is, and one recommended action each. Separate observation from causal claims.

    Needs the user's dataset to be provided; it does not fetch data and cannot confirm business causes from correlations alone.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Frequently Asked Questions

    Clean and analyze sales data in Python: KPIs, discount and margin analysis, RFM customer segments, and an interactive Plotly dashboard.

    This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

    Connect your AI agent to Agensi through MCP, then ask it to use Python Sales EDA and Profitability Analysis on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

    New in Research & Analysis

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Research & Analysis.

    Free