Data engineer vs data analyst vs data scientist

All three job posts ask for SQL and Python, yet the jobs are very different. The data engineer makes sure data arrives correct and on time, the data analyst explains what happened, and the data scientist predicts what will happen next. Follow all three through one working day, watch them handle a live incident, compare their skills and career paths, and find out which role your skills match today.

Module 6 · Careers⏱ 25 minBeginner → AdvancedRuns in your browser (Python)3 real-time scenariosSkill matcher for your PC9 practice problems
1 The story

Three job posts, one confused student

Placement season. TiffinGo, where Kabir interned, has opened three positions: Data Engineer, Data Analyst and Data Scientist. All three job posts mention SQL and Python. Riya wants to apply but has no idea which role is hers, or what each person actually does all day. Kabir, now with a full-time offer, joins her in Arjun Sir's cabin.

Data Engineer builds the pipes that bring clean data in Data Analyst turns data into answers and dashboards Data Scientist ? predicts what will happen with models and statistics Same data, three different questions: is it there? · what happened? · what will happen?
Riya

Sir, all three posts ask for SQL and Python. Aren't they the same job with different titles?

Arjun Sir

They share tools, Riya, but they answer different questions. The data engineer asks “is the right data arriving, clean and on time?” The analyst asks “what happened, and why?” The scientist asks “what will happen next, and what should we do about it?”

Kabir

At TiffinGo I saw it every day. When orders dropped one Friday, the analyst found it was rain in two areas, the scientist built a model that predicts rain-day demand, and the engineer piped live weather data into the platform.

Riya

So it's a relay race?

Arjun Sir

A relay where everyone runs at once. Today you'll see a full Monday for all three, compare their skills and career paths, and even run a program that tells you which role your current skills match best.

2 Definition

What do the three roles do?

Formal definitions (write these in exams)

A data engineer designs, builds and maintains the systems that collect, store, transform and deliver data reliably at scale: ingestion, pipelines, data lakes and warehouses, and their quality and performance. A data analyst examines prepared data to answer business questions, using SQL, spreadsheets, statistics and visualisation to produce reports, dashboards and recommendations about what happened and why. A data scientist uses statistics, machine learning and experimentation to build models that predict outcomes, find patterns and support decisions about what is likely to happen and what to do.

In simple words

Engineer: makes sure the data is there, correct and on time. Analyst: explains what the data says about the past and present. Scientist: uses the data to predict the future and test ideas.

Words you'll meet in this lesson

PipelineAn automated chain of steps that moves and transforms data. The engineer's main product.
DashboardA screen of charts and numbers that updates automatically. A typical analyst deliverable.
ModelA program trained on past data to make predictions. The scientist's main product.
KPIKey Performance Indicator: a number the business tracks, like daily orders or cancellation rate.
A/B testAn experiment comparing two versions (A and B) to see which works better.
StakeholderA person who uses or depends on your work: a manager, finance, marketing.
Data qualityWhether data is complete, correct, consistent and fresh.
ProductionThe live system real users depend on, as opposed to a test or a notebook.

The three roles at a glance

Data engineerQuestion: Is the data there, correct and on time? · Builds pipelines, lakes, warehouses · Python, SQL, Spark, Kafka, Airflow, cloud, Linux
Data analystQuestion: What happened and why? · Builds reports, dashboards, analyses · SQL, Excel, Power BI/Tableau, statistics, communication
Data scientistQuestion: What will happen, and what should we do? · Builds models, experiments · Python, statistics, machine learning, SQL

The three roles at three levels

Pick your level. New to this? Start at Beginner and climb.

Beginner The restaurant again

  • Data engineer = the person who sets up the kitchen's supply chain: vegetables arrive fresh, on time, washed and in the right shelves, every single day.
  • Data analyst = the person who reads the bills every evening and tells the owner: “Paneer sold out at 8 pm on Fridays; dal makhani sells less on Mondays.”
  • Data scientist = the person who predicts next Friday's paneer demand from weather, cricket matches and festivals, and tests whether a new combo meal increases orders.

All three need the others. Without the engineer, the analyst has no data; without the analyst, nobody knows what is happening; without the scientist, the business only looks backwards.

Intermediate Skills, deliverables and a typical week

  • Engineer: writes Python and SQL that runs every night; builds Spark jobs and Kafka consumers; schedules DAGs in Airflow; designs tables; fixes failures; adds data-quality checks. Success = pipelines that run on time, every time.
  • Analyst: writes SQL queries; builds Power BI or Tableau dashboards; explains changes in KPIs; prepares weekly business reviews; turns vague questions (“why are sales down?”) into precise analyses. Success = decisions made from their insights.
  • Scientist: explores data in notebooks; builds features; trains and evaluates models (scikit-learn, sometimes deep learning); designs A/B tests; explains uncertainty. Success = models and experiments that improve a business metric.
  • Shared ground: all three use SQL daily, use Git, and must communicate clearly with non-technical people.

Advanced Adjacent roles, career paths and how AI is changing the work

  • Adjacent roles: analytics engineer (between analyst and engineer: builds clean, tested models of data in SQL with tools like dbt), ML engineer (puts models into production and keeps them running), data architect (designs the whole platform), BI developer, MLOps engineer, data product manager.
  • Seniority: junior → senior → lead/staff (deep technical ownership) or manager (people and planning). Seniority means owning bigger, more ambiguous problems, not just knowing more tools.
  • Common switches: analyst → analytics engineer → data engineer; analyst → data scientist (with statistics and ML); software developer → data engineer; scientist → ML engineer.
  • AI assistants now write much routine SQL and boilerplate code. This raises the value of what they can't do alone: understanding the business, judging data quality, designing reliable systems, and asking the right question.
  • Hiring signals: a small real project you can explain end to end (a pipeline, a dashboard with insights, or a model with an honest evaluation) usually counts for more than a long list of certificates.

Exam tip: For “compare data engineer, data analyst and data scientist”, tabulate: main question, responsibilities, tools, deliverables, typical background and who uses their work. Add one line on how they depend on each other.

3 Types and ways to use it

Side by side, and the roles in between

Data engineerData analystData scientist
Main questionIs the data there, correct, on time?What happened and why?What will happen? What should we do?
BuildsPipelines, lakes, warehouses, data modelsReports, dashboards, analysesPredictive models, experiments
Core toolsPython, SQL, Spark, Kafka, Airflow, cloud, Linux, GitSQL, Excel, Power BI / Tableau, some PythonPython (pandas, scikit-learn), SQL, statistics, notebooks
Maths neededModerateDescriptive statisticsStrong statistics, probability, ML
Works mostly withPlatform and software teamsBusiness teams and managersProduct, business and engineering
A bad dayA pipeline failed at 2 am and dashboards are emptyTwo dashboards show different numbersA model that looked great in testing fails on real data
Typical startCS/IT graduates, software developersAny graduate with strong SQL/Excel (commerce, science, engineering)Maths/statistics/CS graduates, often with a master's

Roles in between (Advanced)

Analytics engineer

Turns raw warehouse tables into clean, tested, documented models with SQL and dbt, so analysts can trust them. A popular step from analyst towards engineering.

Analyst ↔ Engineer

ML engineer

Takes a scientist's model to production: serving, monitoring, retraining pipelines and performance at scale.

Scientist ↔ Engineer

Data architect

Designs the overall platform: which storage, which engines, how data is modelled, secured and governed across the company.

Senior engineering

Indicative salary ranges in India (2026)

ExperienceData analystData engineerData scientist
Fresher (0–2 years)₹3.5–6 LPA₹4–8 LPA₹6–9 LPA
Mid-level (3–6 years)₹6–12 LPA₹8–20 LPA₹12–22 LPA
Senior (7+ years)₹12–20 LPA and above₹15–35 LPA and above₹20–35 LPA and above

Indicative ranges compiled from salary guides published in 2026 that draw on job portals and salary aggregators (such as Glassdoor India and AmbitionBox). Real offers vary widely by city, company type and skills: product companies and global capability centres often pay far more than these ranges, and specialised skills (cloud, streaming, ML engineering) raise pay further. Always check current listings before deciding.

Choose by the work you enjoy, not by the title. If you like building things that run reliably, try engineering. If you like explaining patterns to people, try analysis. If you like statistics and experiments, try data science. The first year's skills overlap a lot, so switching later is common.

4 Step by step

One business question, three roles

  1. The question

    Monday morning, the city manager asks: “Why did Pune orders drop 12% last Friday, and will it happen again?”

    A vague question. Each role turns part of it into precise work.
  2. Engineer: can we trust the data?

    SELECT date, COUNT(*) AS orders, MAX(loaded_at) AS last_load
    FROM silver.orders WHERE city = 'Pune' AND date >= '2026-10-13'
    GROUP BY date ORDER BY date;
    First, rule out a broken pipeline: were all of Friday's files loaded on time? They were, so the drop is real, not a data problem. Engineers save teams from analysing missing data.
  3. Analyst: what happened and where?

    SELECT area, SUM(CASE WHEN date = '2026-10-17' THEN 1 ELSE 0 END) AS fri,
           SUM(CASE WHEN date = '2026-10-10' THEN 1 ELSE 0 END) AS last_fri
    FROM silver.orders WHERE city = 'Pune' GROUP BY area ORDER BY fri - last_fri;
    The drop is concentrated in two areas, during 7–10 pm, when heavy rain was reported. The analyst shows it on a dashboard and explains it in two sentences to the manager.
  4. Scientist: will it happen again?

    from sklearn.ensemble import GradientBoostingRegressor
    model = GradientBoostingRegressor().fit(X_train, y_train)   # features: hour, area, rain_mm, match_day …
    print(model.score(X_test, y_test))
    A demand model using weather, time and area predicts rainy-evening drops. The scientist also designs an A/B test: do higher rider incentives on rainy evenings recover the lost orders?
  5. Engineer again: make it run every day

    The model needs live rain data, so the engineer adds a weather feed to the pipeline and schedules the model's daily features.

    This handover from notebook to production is where ML engineers and data engineers work closely with scientists. The result: on rainy evenings, rider incentives switch on automatically.
5 See it happen

A Monday at TiffinGo: three screens, one platform

Step through six moments of the day. Left: whose screen we are looking at. Right: which part of the data platform they are working on.

A day in three roles 6 steps
What you see 09:00 · Data engineer · Kabir ALERT daily_sales: task load_dw failed log: column "coupon" not found fix: add column, re-run from load_dw 09:40 load_dw ✓ refresh_bi ✓ Dashboards are fresh before anyone notices. 10:30 · Data analyst · Priya Pune orders · last 2 Fridays 10 Oct 17 Oct −12% drop: Kothrud + Baner, 7–10 pm, rain She finds where and when the drop happened. 12:00 · Data scientist · Arnav In [7]: model.fit(X_train, y_train) In [8]: mean_abs_error(y_test, pred) Out[8]: 41 orders/hour top features: rain_mm, hour, area He predicts rainy-evening demand. 15:00 · All three + the city manager Kabir: “The data for Friday is complete.”Priya: “The drop is rain in two areas.”Arnav: “It will repeat on rainy evenings. Let's test higher rider incentives.”Manager: “Run the test this week.” Each role answered a different part. 17:00 · Engineer + scientist + task: fetch_weather (every 15 min) + task: build_features → score_model + alert if rain_mm feed is late The notebook becomes a production pipeline. Next rainy Friday Rain forecast → incentives ON Riders stay online; drop shrinks to −3% (measured by the A/B test Priya analyses) One business result, three roles. myphatshala.in
Behind the screen Ingest Store Process Query/BI Models Engineer's territory ingest · store · process · orchestrate keeps data arriving, correct and on time Analyst's territory SQL on gold tables · dashboards explains what happened and why Scientist's territory silver + raw data → features → models predicts and runs experiments Same platform, shared language everyone uses SQL, Git and the catalogue trust flows left to right Notebook → production new weather ingest feeds the model daily (the ML engineer's speciality) Engineerreliable data Analystclear insight Scientistprediction = one business decision that works myphatshala.in
6 Real-world use

Careers in motion: three real-time scenarios

Watch the three roles respond to a live incident, see how careers grow over ten years, and (advanced) compare the skill profile each role needs.

Real-time scenario 1

Diwali night: the dashboard shows zero orders

20:47 on the busiest night of the year. The live orders dashboard suddenly drops to zero. Is the business down, or is the data down? Watch who does what, minute by minute.

An incident, three roles 5 steps
Animated example LIVE ORDERS / MIN 0 ?! back-filled ✓ 20:47 · Analyst (first to notice)“Orders are zero, but the app's payment success pageis still being hit. The business is probably fine;the data is not.” Raises an incident, tags the engineer.Skill: knowing what “normal” looks like, cross-checking. 20:52 · Engineer (diagnose)Kafka is receiving orders. The stream job crashed:out of memory at 4× normal traffic. Restarts it withmore workers; it resumes from its last checkpoint.Skill: reading logs, knowing the pipeline, staying calm. 21:05 · Engineer (recover)The job replays the 13 missed minutes from Kafka.No order is lost; the dashboard is back-filled.Adds an alert: “stream lag > 2 minutes”.Lessons 2.2 and 2.4 in real life. Next day · ScientistUses the demand model to forecast peak traffic forevery festival night of the year, so capacity can beadded in advance instead of during an outage.Skill: turning history into a forecast with error bars. The post-incident reviewAnalyst: noticed in 2 min, ruled out a real outageEngineer: fixed in 18 min, lost no data, added alertScientist: prevents the next one with a forecastNo role alone could have handled it as well. myphatshala.in
Real-time scenario 2

Ten years in fast-forward: how the three careers grow

Riya, Kabir and Arnav start in 2026 as a junior analyst, engineer and scientist. Watch typical paths over ten years, including the switches people commonly make.

Career ladders 5 steps
Animated example Year 0Year 2–3Year 5–6Year 8–10 Junioranalyst Junior dataengineer Junior datascientist Senioranalyst Dataengineer II Datascientist Analyticsengineer Senior dataengineer MLengineer Dataeng. lead Dataarchitect Head ofdata science Three friends, three starting roles. Years 2–3: own bigger problems. switch ↗specialise ↘ lead people · design systems · set direction Paths cross: skills from any start transfer to the others myphatshala.in
Real-time scenario 3 · Advanced

Skill profiles: what each role needs most

Seven skills, scored from 1 (basic) to 5 (deep), for a typical mid-level person in each role. Watch the three profiles appear, then compare them to your own.

Skill depth by role 5 steps
Animated example SQLPythonStatistics / MLDistributed systemsCloud / DevOpsVisualisationBusiness communication ■ Engineer■ Analyst■ Scientist Each bar: depth 1–5 (illustrative). Engineer: deepest indistributed systems + cloud Analyst: deepest in SQL,visualisation, communication Scientist: deepest inPython + statistics/ML Everyone has SQL ≥ 3start there; then go deepwhere your interest is Scores are typical expectations, not fixed rules; teams differ. myphatshala.in

Where these roles work

₹

1. Banks and fintech

Engineers build regulatory and risk data pipelines; analysts track products, collections and customer behaviour; scientists build credit-scoring and fraud models under strict review.

Engineer: risk pipelines·Analyst: product KPIs·Scientist: fraud models

2. E-commerce and quick commerce

Very large data teams: streaming engineers for live inventory, analysts for category and marketing performance, scientists for recommendations, pricing and delivery-time prediction.

Engineer: live inventory·Analyst: sales by category·Scientist: recommendations

3. Healthcare

Engineers integrate hospital systems with strict privacy controls; analysts monitor bed occupancy and outcomes; scientists build models that flag high-risk patients for doctors to review.

Engineer: secure integration·Analyst: hospital KPIs·Scientist: risk models

4. IT services and global capability centres

Many Indian freshers start here, working on data projects for clients worldwide: migrating platforms to the cloud, building pipelines, and creating dashboards. It is a common route into all three roles.

Client projects→Cloud migration, pipelines, BI→Broad early experience

5. Government and public sector

Public digital systems generate large datasets. Data roles support dashboards for programmes, detect anomalies and fraud, and plan services, with strong emphasis on data protection.

Public datasets→Dashboards + anomaly detection→Better services

Role boundaries differ between companies; small startups often expect one person to do parts of all three.

7 Run the code

Which role fits you? A tiny quiz engine

Each statement adds points to one or more roles. Change the answers to match yourself (True if the statement describes you) and run it. Then try the challenges: classify real job-description lines, find your skill gap, and plan a team.

statements = {
    "I enjoy building things that run automatically every night": {"engineer": 2},
    "I like explaining numbers to people in simple words":        {"analyst": 2},
    "Statistics and probability interest me":                     {"scientist": 2, "analyst": 1},
    "I like fixing things when they break":                       {"engineer": 2},
    "I enjoy making charts and dashboards":                       {"analyst": 2},
    "I want to predict the future from past data":                {"scientist": 2},
    "Linux, servers and cloud sound exciting":                    {"engineer": 2},
    "I like running experiments to test ideas":                   {"scientist": 2},
}
answers = [True, False, False, True, False, True, True, False]   # change these!

scores = {"engineer": 0, "analyst": 0, "scientist": 0}
for (statement, points), yes in zip(statements.items(), answers):
    if yes:
        for role, p in points.items():
            scores[role] += p

for role, s in sorted(scores.items(), key=lambda x: -x[1]):
    print(f"{role:9} {'#' * s} {s}")
print("Best match today:", max(scores, key=scores.get))
engineer ###### 6 scientist ## 2 analyst 0 Best match today: engineer
  • statements = {...}A dictionary of dictionaries: each statement maps to the roles it points towards and how strongly.
  • zip(statements.items(), answers)zip pairs each statement with your True/False answer, in order.
  • '#' * sMultiplying a string repeats it: a quick text bar chart.
  • max(scores, key=scores.get)The role with the highest score. A match today is not destiny; skills change with learning.

Run it on your PC: match your skills to job descriptions

Put your real skills in my_skills, paste real job descriptions you find online into job_descriptions, and run. The program shows how well you match each one and which skills to learn next. Save it as jd_matcher.py.

How close are you to each role?

# Compare YOUR skills with three typical job descriptions and see the gap.
my_skills = {"python", "sql", "excel", "statistics", "power bi", "git"}

job_descriptions = {
    "Data Analyst": """Strong SQL and Excel. Build dashboards in Power BI or Tableau.
        Basic statistics. Communicate insights to business teams. Python is a plus.""",
    "Data Engineer": """Python and SQL. Build batch and streaming pipelines with Spark and Kafka.
        Orchestrate with Airflow. Cloud (AWS or Azure), Linux, Git, data modelling.""",
    "Data Scientist": """Python, SQL, statistics and machine learning (scikit-learn).
        Feature engineering, experiment design, model evaluation. Git; Spark is a plus.""",
}
vocabulary = ["python", "sql", "excel", "power bi", "tableau", "statistics", "spark", "kafka",
              "airflow", "cloud", "linux", "git", "machine learning", "data modelling",
              "communicate", "dashboards", "feature engineering", "experiment design"]

for role, text in job_descriptions.items():
    text = text.lower()
    wanted = {skill for skill in vocabulary if skill in text}
    have = wanted & my_skills
    missing = sorted(wanted - my_skills)
    score = round(len(have) / len(wanted) * 100)
    print(f"{role:15} match {score:>3}%  ({len(have)}/{len(wanted)} skills)")
    print(f"{'':15} learn next: {', '.join(missing[:4])}")

# In a terminal:  python jd_matcher.py
Data Analyst match 62% (5/8 skills) learn next: communicate, dashboards, tableau Data Engineer match 33% (3/9 skills) learn next: airflow, cloud, data modelling, kafka Data Scientist match 50% (4/8 skills) learn next: experiment design, feature engineering, machine learning, spark

Recorded from a real run with the sample skills and job descriptions above; your output will match until you change them. A keyword match is a rough guide: real job posts use different words for the same skill, so extend the vocabulary list as you read more posts.

8 Line by line

The role quiz, one line at a time

A shorter quiz with three statements. Watch the scores dictionary change only when an answer is True, and watch the inner loop add points to each role a statement mentions.

Worked examples: real problems, solved and traced in memory

Four career problems: recognising the work, reading job posts, closing a skill gap and planning a team. Each runs live and is traced.

Example 1BeginnerSelf-check · roles

Whose job is this task?

Problem statement

Assign each everyday task to the role that usually owns it.

Input
fix a failed nightly load · build a sales dashboard · predict next week's demand · add a Kafka topic · explain a drop in KPIs · design an A/B test
Expected output
engineer : fix a failed nightly load; add a Kafka topic
analyst  : build a sales dashboard; explain a drop in KPIs
scientist: predict next week's demand; design an A/B test

Approach

  1. Map each task to its owner with a dictionary.
  2. Group tasks by role.
  3. Print each role with its tasks.

Solution: run it live

What happens in memory, step by step

Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.

Example 2IntermediateJob search · reading posts

Score a job post by role keywords

Problem statement

A post titled “Data Analyst” says: Build ETL pipelines in Spark, schedule with Airflow, create one Power BI report. Count keywords for each role to see what the job really is.

Input
the job post text
Expected output
{'engineer': 4, 'analyst': 2, 'scientist': 0}
Title says analyst; work says engineer

Approach

  1. Keep a keyword list per role.
  2. Count how many keywords from each list appear in the lower-cased post.
  3. The highest count suggests the real role.

Solution: run it live

What happens in memory, step by step

Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.

Example 3IntermediateCareer plan · skill gap

What should I learn first?

Problem statement

Your target is data engineering. Each missing skill has a priority (how often it appears in job posts, out of 10). List missing skills, highest priority first.

Input
needed with priorities; you have python, sql, git
Expected output
spark    priority 8
cloud    priority 8
airflow  priority 7
kafka    priority 6

Approach

  1. Store needed skills with priorities in a dictionary.
  2. Keep only those not in your skills set.
  3. Sort by priority, highest first.

Solution: run it live

What happens in memory, step by step

Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.

Example 4AdvancedStartup · team design

How many people of each role?

Problem statement

A startup expects these weekly hours: pipelines 95, dashboards 60, models 25. One person works 40 hours a week. Startups with less than a full role of work often combine roles. Show the full-time headcount and any leftover hours.

Input
pipelines 95 h, dashboards 60 h, models 25 h
Expected output
engineer : 2 full-time + 15 h left over
analyst  : 1 full-time + 20 h left over
scientist: 0 full-time + 25 h left over
Combined leftover hours: 60 -> about 1.5 more people

Approach

  1. Full-time people = hours // 40.
  2. Leftover hours = hours % 40, which may be combined into a mixed role.
  3. Print both for each type of work.

Solution: run it live

What happens in memory, step by step

Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.

9 Quiz and revision

Check yourself

Quick revision

Lesson 6.1 in one screen

  • Engineer: is the data there, correct, on time? → pipelines, lakes, warehouses.
  • Analyst: what happened and why? → SQL, dashboards, insights.
  • Scientist: what will happen and what should we do? → models, experiments.
  • All three use SQL, Git and clear communication; they depend on one another.
  • In between: analytics engineer (analyst↔engineer), ML engineer (scientist↔engineer), data architect.
  • Careers move: analyst → analytics/data engineer; analyst → scientist; developer → data engineer.
  • Pay varies widely by company type, city and skills; check current listings. A real project beats a list of certificates.

Interview and viva questions

Differentiate the roles of data engineer, data analyst and data scientist.

A data engineer builds and maintains the infrastructure and pipelines that deliver reliable data. A data analyst queries and visualises that data to explain business performance and support decisions. A data scientist applies statistics and machine learning to predict outcomes and design experiments. Engineers enable the work of the other two; analysts and scientists turn data into decisions.

Why do you want to be a data engineer rather than a data scientist?

A good answer is honest and specific: for example, “I enjoy building systems that run reliably and at scale, I like debugging pipelines and working with distributed tools like Spark and Kafka, and I want my work to enable every analyst and scientist in the company.” Back it with a project you built.

What skills does a fresher need for a data analyst role?

Strong SQL (joins, group by, window functions), Excel, one BI tool (Power BI or Tableau), basic statistics (averages, percentages, distributions), and the ability to explain findings clearly. Basic Python is a plus. A portfolio dashboard with clear insights helps a lot.

Can a data analyst become a data engineer or data scientist?

Yes, and it is common. Towards engineering: deepen Python, learn data modelling, Spark, Airflow, a cloud platform and Git, often via an analytics-engineer role. Towards science: deepen statistics, learn machine learning with Python, and practise experiments on real problems.

What is the difference between a data scientist and an ML engineer?

A data scientist explores data, builds and evaluates models, and interprets results. An ML engineer takes models to production: building serving systems, feature pipelines, monitoring and retraining at scale. In smaller companies one person may do both.

Practice problems

Career-flavoured coding exercises. The last two are planning decisions a data team lead makes.

P1Easy

Count tasks per role

Count how many tasks each role has in the list.

Input
engineer, analyst, engineer, scientist, analyst, engineer
Expected output
{'engineer': 3, 'analyst': 2, 'scientist': 1}
Show solution and explanation
tasks = ["engineer", "analyst", "engineer", "scientist", "analyst", "engineer"]
counts = {}
for r in tasks:
    counts[r] = counts.get(r, 0) + 1
print(counts)
{'engineer': 3, 'analyst': 2, 'scientist': 1}

How it works: The dictionary counter pattern, again. You will use it in every data role.

P2Easy

Shared skills

Print the skills common to both job posts.

Input
analyst: sql, excel, power bi · engineer: sql, python, spark
Expected output
Common: {'sql'}
Show solution and explanation
analyst = {"sql", "excel", "power bi"}
engineer = {"sql", "python", "spark"}
print("Common:", analyst & engineer)
Common: {'sql'}

How it works: Set intersection (&): SQL is the overlap.

P3Easy

Match percentage

A job needs 8 skills and you have 5 of them. Print your match as a percentage.

Input
5 of 8
Expected output
62 % match
Show solution and explanation
print(round(5 / 8 * 100), "% match")
62 % match

How it works: A simple, honest progress measure for job preparation.

P4Medium

Missing skills

Print the skills a data scientist post needs that you don't have yet, in alphabetical order.

Input
needs: python, sql, statistics, machine learning · have: python, sql
Expected output
['machine learning', 'statistics']
Show solution and explanation
needs = {"python", "sql", "statistics", "machine learning"}
have = {"python", "sql"}
print(sorted(needs - have))
['machine learning', 'statistics']

How it works: Set difference (−) shows the gap; sorted makes the output stable.

P5Medium

Title vs content

Given keyword counts from a post, print whether the title matches the content.

Input
title analyst · counts engineer 4, analyst 1, scientist 0
Expected output
Real role: engineer
Show solution and explanation
title = "analyst"
counts = {"engineer": 4, "analyst": 1, "scientist": 0}
real = max(counts, key=counts.get)
print("Matches title" if real == title else f"Real role: {real}")
Real role: engineer

How it works: Read job descriptions, not just titles; companies use titles differently.

P6Advanced

Rank roles for a profile

Given your skill depth (1–5) and each role's required depth, score each role as the sum of the smaller of the two values, and rank the roles.

Input
you: sql 4, python 3, stats 4, cloud 1
Expected output
scientist 11
analyst 10
engineer 9
Show solution and explanation
me = {"sql": 4, "python": 3, "stats": 4, "cloud": 1}
roles = {"engineer": {"sql": 4, "python": 4, "stats": 1, "cloud": 4},
         "analyst": {"sql": 5, "python": 2, "stats": 3, "cloud": 1},
         "scientist": {"sql": 3, "python": 5, "stats": 5, "cloud": 2}}
fit = {r: sum(min(me[s], need) for s, need in req.items()) for r, req in roles.items()}
for r, f in sorted(fit.items(), key=lambda x: -x[1]):
    print(r, f)
scientist 11 analyst 10 engineer 9

How it works: Using min means extra depth beyond what the role needs doesn't add points.

P7Advanced

Weeks to job-ready

Each missing skill takes a number of weeks; you study 10 hours a week and each week of the estimate assumes 10 hours. If you can study 15 hours, how many weeks will the plan take?

Input
spark 3, airflow 2, cloud 3, kafka 2 (weeks at 10 h)
Expected output
6.7 weeks at 15 hours a week
Show solution and explanation
plan = {"spark": 3, "airflow": 2, "cloud": 3, "kafka": 2}
hours_needed = sum(plan.values()) * 10
print(round(hours_needed / 15, 1), "weeks at 15 hours a week")
6.7 weeks at 15 hours a week

How it works: Convert to hours first, then divide by your real weekly capacity.

P8Business problem

First data hire

A startup has 3 data needs with weekly hours: dashboards 30, pipelines 25, models 5. Print which role should be hired first (the one with most hours).

Input
dashboards 30, pipelines 25, models 5
Expected output
Hire first: analyst
Show solution and explanation
needs = {"analyst": 30, "engineer": 25, "scientist": 5}
print("Hire first:", max(needs, key=needs.get))
Hire first: analyst

How it works: Many startups hire an analyst or analytics engineer first, and a scientist only when there is enough clean data to model.

P9Business problem

Team cost (illustrative)

Monthly cost per person: analyst Rs 60,000, engineer Rs 90,000, scientist Rs 1,10,000 (illustrative). Print the cost of a team of 2 analysts, 2 engineers and 1 scientist.

Input
2 · 2 · 1
Expected output
Monthly team cost: Rs 410000
Show solution and explanation
cost = {"analyst": 60000, "engineer": 90000, "scientist": 110000}
team = {"analyst": 2, "engineer": 2, "scientist": 1}
print("Monthly team cost: Rs", sum(cost[r] * n for r, n in team.items()))
Monthly team cost: Rs 410000

How it works: Team planning combines workload and cost; the numbers are examples only.

Real-world scenario questions (asked in company interviews)

Career and teamwork questions asked in data interviews. Decide your answer first, then open the model answer.

Campus interview · motivationFresher

“Why this role and not the other two?”

You are interviewing for a data engineer role. The panel asks why you didn't apply for the data scientist opening, which “pays more”.

The interviewer is checking: do you understand the role, and is your interest genuine?

Show a strong answer

Answer with the work, not the salary: “I enjoy building things that run reliably: in my project I built a pipeline that ingests daily data, cleans it with Spark and loads a warehouse, with a scheduled DAG and quality checks. Data science interests me too, but I get the most satisfaction from making data trustworthy for everyone who depends on it.”

  • Mention one concrete project and one problem you debugged.
  • Show you know how the roles depend on each other.

Avoid: “Data science was too hard” or “I'll switch later anyway.”

Analytics · data qualityFresher

Finance says your dashboard is wrong

You are a junior analyst. Finance says your revenue dashboard is 4% higher than their numbers. Your SQL looks correct.

The interviewer is checking: can you investigate calmly and work with engineering?

Show a strong answer
  1. Agree the definition first: gross or net of refunds? Which time zone and date cut-off?
  2. Reconcile on a small slice (one day, one city) to find where the numbers diverge.
  3. Check the source tables for duplicates or late data; involve the data engineer if the pipeline is the cause.
  4. Fix, document the definition, and add a check so it doesn't recur.

Avoid: defending your number without checking, or quietly changing it to match.

Career switch · planning1–3 years

From analyst to data engineer in a year

You have two years as a data analyst (strong SQL, Power BI, basic Python). Your manager asks what your plan is to move into data engineering.

The interviewer is checking: a realistic, structured growth plan.

Show a strong answer
  • Months 1–3: solid Python (functions, testing, packaging), Git workflows, Linux basics.
  • Months 4–6: data modelling and dbt; take on analytics-engineering tasks in the current team.
  • Months 7–9: Spark and Airflow; build an end-to-end pipeline project on one cloud.
  • Months 10–12: shadow the data engineering team, own a small pipeline, then apply internally.

Your analyst background is an asset: you know the business data and what users need from it.

Avoid: a plan that is only a list of certificates.

Startup · team building3+ years

“We want to hire a data scientist first”

A 40-person startup has data spread across its app database, spreadsheets and a payment provider. The founder wants to hire a data scientist first “to do AI”. You are asked for advice.

The interviewer is checking: do you understand dependencies between roles?

Show a strong answer

A scientist without reliable, joined data will spend most of the time cleaning and connecting sources. Usually the first hire should be someone who can build the foundation and deliver early value:

  • Hire a data/analytics engineer who can set up a cloud warehouse, load the sources and build clean tables, or an analyst with strong engineering skills.
  • Deliver core dashboards first (revenue, retention, operations) to build trust.
  • Hire a scientist once there is clean history and a specific prediction problem worth solving.

Avoid: hiring for “AI” before there is data to learn from.