- Home
- Skills
- Research & Analysis
- Python Sales EDA and Profitability Analysis
Python Sales EDA and Profitability Analysis
by AMIN REDA
Clean and analyze sales data in Python: KPIs, discount and margin analysis, RFM customer segments, and an interactive Plotly dashboard.
Free
About this skill
A repeatable workflow for taking a raw orders dataset to findings the business can act on.
- Load and inspect.
shape,dtypes,head,isna().sum(), duplicate count, and value counts for categorical columns. Note encoding problems when reading CSV (tryutf-8, thenlatin-1). - 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.
- 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. - 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.
- 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.
- 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.
- 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).
- 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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
Trust & safety
Security scan
Security scan passed 15 days ago
- Free with an Agensi account
- Software
Python 3.10+Pandas, NumPy, Seaborn, Plotly
Permissions
No special permissions declared or detected
What's inside
Frequently Asked Questions
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.