Fill in your details optional The prompt below updates as you type. What you type stays in this browser and is never sent to us.
You are an expert in this kind of work, and you know the E-commerce & Retail sector from the inside.
## Your task
Write a Python script using pandas and matplotlib that loads [FILE NAME], cleans it, computes conversion rate and average order value by [DIMENSION] and month, and saves two charts. Our columns: [COLUMNS]. Comment the code for a team member at an online store selling physical products who is new to Python.
## About my situation
- Who this is for: online shoppers and repeat customers
- What we must respect: consumer-protection rules, return policies and stock levels
## What matters in E-commerce & Retail
- Numbers that matter: conversion rate; average order value; cart abandonment; customer acquisition cost; repeat purchase rate; return and RTO rate; ROAS; customer lifetime value.
- Tools commonly used: Shopify or WooCommerce; Amazon and Flipkart seller tools; Razorpay or Stripe; Shiprocket; GA4; WhatsApp and email automation.
- Rules and standards that usually apply: consumer-protection law (India's Consumer Protection (E-Commerce) Rules 2020, EU consumer rights, FTC rules); a clear return and refund policy; honest pricing: real MRP, no fake discounts or drip pricing; product labelling requirements; payment security (PCI DSS) and marketplace policies.
- Rules differ by country. If I have not said where I work, ask me, and do not present one country's law as if it applied everywhere.
## How to work through it
1. Load and clean the file.
2. Compute the metric by dimension and month.
3. Save two charts.
4. Comment every step for a beginner.
## What to deliver
- Complete Python script
- How to run it
## Rules
- Make every point specific to my situation and my industry; replace generic advice with detail that fits.
- Use plain language, short sentences, and tables where they make the answer easier to scan.
- Use only the facts I give you. Do not invent figures, laws, sources or quotes. Mark anything you had to assume with "Assumption:".
- If something important is missing, ask me up to 3 short questions before you start.
## Before you answer
Check your draft against this list and fix anything that fails:
- Every number comes from my data or is marked as an assumption, and correlation is never presented as cause.
- It is written for an online store selling physical products; nothing in it would read the same for any other business.
- Nothing in it breaks consumer-protection rules, return policies and stock levels.
- Every item under "What to deliver" is included.
How to use this prompt
- Copy the prompt. Press Copy prompt and the full text goes to your clipboard.
- Fill the brackets. Use the form above, or replace [FILE NAME], [DIMENSION], [COLUMNS] with your own details.
- Paste and send. Paste it into ChatGPT, Claude, Microsoft Copilot and DeepSeek and send. Ask follow-up questions to refine the answer.
Why this prompt works
The “Python analysis script” prompt tells the assistant exactly what to hand back: complete Python script; and how to run it. It makes the assistant work through 4 steps in order, starting with "load and clean the file", instead of jumping straight to an answer. Before replying, the assistant checks its draft against 4 tests and fixes anything that fails.
This version is written for an online store selling physical products, so the assistant keeps consumer-protection rules, return policies and stock levels in mind and judges the result by conversion rate and average order value. If an important detail is missing, it asks you up to 3 short questions before it starts.
How to get the best answer
- Fill every bracket with real detail: [FILE NAME], [DIMENSION], [COLUMNS] should hold real names, numbers and dates, not placeholders.
- Paste real material: where the prompt asks for notes, data or text, paste the actual content rather than a summary.
- Refine in the same chat: ask "make it shorter", "turn it into a table" or "add more detail on step 2".
- Check the result: review it against what you know about conversion rate and average order value before you share it.
Other industries
Same prompt for other industries
The same python analysis script prompt, rewritten for each industry.
FAQ
Frequently asked questions
Which AI assistant works best with the “Python analysis script” prompt?
The “Python analysis script” prompt works in any chat assistant and suits ChatGPT, Claude, Microsoft Copilot and DeepSeek best. Paste it in, send it, and ask follow-up questions in the same chat to refine the answer.
What do I fill in before sending the “Python analysis script” prompt?
Replace the 3 highlighted brackets – [FILE NAME], [DIMENSION], [COLUMNS] – with your own details. The more specific you are, the better the answer.
Is the “Python analysis script” prompt only for E-commerce & Retail?
No. This version is written for an online store selling physical products, and the same prompt is also written for 15 other industries, listed on this page.
Is the “Python analysis script” prompt free to use?
Yes. First AI Prompt prompts are free to copy and use in personal and business work, with no sign-up, no account and no daily limit.
Can I trust the answer the “Python analysis script” prompt gives?
Treat it as a strong first draft: the prompt tells the assistant not to invent facts and to mark its assumptions, but check figures yourself, especially anything with legal, financial or safety consequences.
Keep exploring
Browse more E-commerce & Retail prompts
- All E-commerce & Retail prompts
- Software Developmentfor E-commerce & Retail
- Project Managementfor E-commerce & Retail
- Marketing & Contentfor E-commerce & Retail
- SEOfor E-commerce & Retail
- Salesfor E-commerce & Retail
- Customer Supportfor E-commerce & Retail
- Business Strategyfor E-commerce & Retail
- Operationsfor E-commerce & Retail
- Browse the full library