Data Science Fundamentals: lesson 2 of 2
Data Science Fundamentals
The Data Science Workflow
Follow a practical, iterative workflow from a business question to useful Data Science outcomes.
Concept
A Data Science workflow is the sequence of activities used to move from a real problem to a useful outcome. It is not a rigid checklist: teams revisit earlier steps as they learn more. The important principle is that problem definition comes before modeling, and communication remains part of the work from start to finish.
Why It Matters
Without a workflow, it is easy to spend hours building a model that solves the wrong problem or analyzing data that cannot support a decision. A structured process helps a team ask the right question, inspect the right data, choose an appropriate method, and explain the result honestly.
Intuition
Think of a workflow as a route, not a conveyor belt. You move forward, but a surprising missing-value pattern or stakeholder question may send you back to clarify the problem, collect another field, or revise a feature. Iteration is normal.
Real-World Example: Customer Churn
Consider a subscription retailer that wants to reduce churn. The business does not initially need “a model.” It needs a decision: which customers should receive an intervention, and what kind of action is practical? The workflow below follows that question through a project.
1. Define the Problem
Write a precise question and outcome. “Reduce churn” is too broad. A better starting point is: “Identify active customers likely to cancel in the next 30 days so the retention team can prioritize outreach.” Define churn, the time window, the affected customer group, and how success will be measured.
2. Understand Business Context
Learn how subscriptions, cancellations, offers, and support interactions actually work. A cancellation after a contract ends may mean something different from a customer leaving after a failed payment. Domain context prevents a technically neat analysis from using the wrong definition.
3. Collect or Access Data
Identify relevant sources: customer profiles, plan history, orders, support contacts, payment events, and cancellation dates. Ask who owns each source and what time period it covers. Access and permissions are part of real work; a useful analysis cannot assume every desired field exists.
4. Inspect Data Quality
Before drawing conclusions, inspect rows, columns, types, duplicates, missing values, and date ranges. For churn, check whether every customer has a unique identifier, whether cancellation dates are complete, and whether a missing support record means “no contact” or “data unavailable.”
5. Clean and Prepare Data
Cleaning may involve standardizing plan names, parsing dates, removing duplicates, handling missing values, and joining tables. Keep a record of important choices. If missing income is filled with a median, that is an analytical decision, not merely a technical operation.
6. Explore the Data
Exploration asks what is present before trying to predict it. Calculate churn rates by plan, tenure, region, or support-contact count. Visualize trends and compare segments. Exploration can reveal that the original question needs refinement, such as discovering churn is concentrated in customers whose renewal payment failed.
7. Engineer Useful Features
A feature is an input that helps describe an observation. For churn, useful features might include tenure_months, days_since_last_order, support_contacts_last_30_days, or whether a payment failed recently. Features should be available before the prediction time; using a future cancellation note would leak the answer.
8. Build Models Where Appropriate
Modeling is optional. If a clear segment analysis answers the business question, a model may add unnecessary complexity. When prediction is genuinely useful, start with a simple interpretable baseline and compare it with the operational need. The goal is not maximum technical complexity; it is reliable decision support.
9. Evaluate Results
Evaluation depends on the objective. For churn outreach, missing a customer who will leave may be costly, while contacting too many low-risk customers also wastes effort. Accuracy alone may not describe this trade-off. Check data splits, relevant metrics, errors by segment, and whether the result is stable enough to use.
10. Communicate Insights
Translate findings into a clear story: what was observed, how reliable it is, what limitations exist, and what action is recommended. A retention lead may need a ranked customer list with explanation and expected capacity, not a notebook full of charts.
11. Deploy and Monitor Where Relevant
Some work ends with a report; other work becomes a dashboard, scheduled score, or product feature. If a model is used regularly, monitor data changes, outcome quality, and whether the original business process changes. A model trained on last year's behavior can become less useful as plans or customers change.
Structured View
| Stage | Churn-project output |
|---|---|
| Problem | A clear 30-day churn and outreach objective |
| Data | Joined customer, payment, order, and support records |
| Exploration | Segment-level churn patterns and data-quality findings |
| Features | Tenure, engagement, payment, and support indicators |
| Evaluation | Metrics tied to outreach cost and retention value |
| Communication | Prioritized action and transparent limitations |
When to Use This Thinking
Use the workflow for a one-off analysis, dashboard request, forecast, or ML project. Scale the detail to the task: a quick sales question may need only a few stages, while a production prediction system needs careful evaluation and monitoring.
Failure Signals
Common Mistakes
- Starting with a model before understanding the decision.
- Ignoring missing, duplicated, or inconsistent data.
- Choosing a metric without business context.
- Overcomplicating a solution when a simple analysis is enough.
- Treating Data Science as only coding and omitting communication.
Best Practices
Keep a written problem statement, validate definitions with stakeholders, and inspect data before building features. Start with simple baselines, record assumptions, and make results reproducible. Revisit earlier steps when new evidence appears instead of forcing the project through an outdated plan.
Data Science Perspective
Python, NumPy, Pandas, SQL, visualization, statistics, and ML each support different workflow stages. Tools do not replace judgment: a clean feature matrix, a useful chart, and an evaluation metric all depend on the problem and data context established first.
Interview Perspective
Question: What do you do before building a model? A strong answer: clarify the business objective and success criteria, understand the decision the model would support, inspect available data and quality, then establish a sensible baseline before adding complexity.
Practice Questions
- Turn “improve retention” into a more specific Data Science problem statement.
- List three data-quality checks you would perform before analyzing churn.
- Explain why a high-accuracy churn model might still be a poor operational solution.
Quick Quiz
- Which step should happen before feature engineering? Answer: inspect and clean the data.
- Does every project need Machine Learning? Answer: no.
- Why is monitoring relevant after deployment? Answer: data and business behavior can change over time.
Key Takeaway
Key Takeaways
Strong Data Science starts with the problem, moves carefully through data and evaluation, communicates an actionable result, and iterates when new evidence changes the plan.
Next Lesson
Next, begin Python: the practical language used throughout this path to work with data, calculations, and workflows.
Finish this lesson on your terms
Mark it complete when you have worked through the material and are ready to move on.