k-bosko/CLV_prediction — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a clean Jupyter notebook that predicts customer lifetime value for an online retail business using the UCI Online Retail II dataset. The goal is to help a marketing person understand how much an average customer is worth and compare a few simple CLV calculation methods.

Please load and clean the transaction data, handle cancellations, missing customer IDs, quantities, prices, dates, and countries in a sensible way. Then calculate monthly revenue, average order value, purchase frequency, retention, churn, and three CLV estimates, basic CLV, granular CLV, and traditional CLV.

I want the notebook to be easy to follow, with plain English explanations before each step, clear tables, and a short conclusion explaining which CLV number seems most realistic and why. Use Python with pandas and NumPy. If you need the exact dataset column meanings or download link, look it up online.

Want more depth? Deep Reverse