Data ScienceCareer switch by background

Mechanical engineer to data scientist: SPC charts and OEE first

PK
Pankit Kumar
Sr. Data Scientist at Parexel (a Goldman Sachs–backed company) · 27 September 2026 · 5 min read
In this article (7 sections)

Related programme: the Data Science course (6 months; ₹1,30,000 (inclusive of GST) · EMI from ₹5,000/month).

The short answer

A mechanical engineer who has run a shop floor already works with the raw material of data science: control charts, OEE calculations, downtime logs and gauge studies. The switch starts by rebuilding one of those artefacts in Python, then asking a predictive question of the same data. What follows is written as advice to one hypothetical engineer, but the steps apply to anyone coming from production, quality or maintenance.

Dear Rohit

You wrote that you have spent six years as a production engineer at an auto-components plant, that you maintain the SPC charts for two machining lines, and that you want to move into data science without throwing those years away. You asked whether the move is realistic and where to start. Here is my honest answer, in the order I would do things.

You have been doing statistics every shift

When your line supervisor asks why the bore diameter on line 2 drifted after lunch, you pull the X-bar and R chart, check whether points fall outside the control limits, look for runs of seven on one side of the centre line, and then walk to the machine to check tool wear. That sequence — look at the distribution, test for a signal against noise, form a hypothesis, check it physically — is the heart of data analysis. Many people who come into data science from software have never had to separate a special cause from common-cause variation with money on the line.

Your other artefacts transfer too:

  • OEE sheets: availability, performance and quality as a product of three ratios. That is metric decomposition, which analysts do constantly.
  • Downtime logs with reason codes: an event log with categories. Pareto charts on reason codes are exploratory data analysis.
  • MSA and gauge R&R studies: measurement error thinking. In data science this is the question "is my label reliable?"
  • Maintenance records: time-between-failures data, the starting point for predicting breakdowns.

Rebuild your OEE sheet in code first

Before any machine learning, reproduce something you already trust. Take a synthetic shift log like the one below and compute OEE per shift. If the numbers match what you would get in Excel, you have learned the tools without also learning a new domain.

python
import pandas as pd

# Synthetic shift log for one machining cell
log = pd.DataFrame({
    "shift":          ["A","B","C","A","B","C"],
    "planned_min":    [480,480,480,480,480,480],
    "downtime_min":   [35, 60, 90, 20, 55, 110],
    "ideal_cycle_s":  [30, 30, 30, 30, 30, 30],
    "total_parts":    [850,780,700,880,790,650],
    "good_parts":     [835,760,665,870,775,610],
})

g = log.groupby("shift").sum()
run_min = g["planned_min"] - g["downtime_min"]
g["availability"] = run_min / g["planned_min"]
g["performance"] = (g["ideal_cycle_s"] / 2 * g["total_parts"]) / (run_min * 60)
g["quality"] = g["good_parts"] / g["total_parts"]
g["oee"] = g["availability"] * g["performance"] * g["quality"]

print(g[["availability","performance","quality","oee"]].round(3))

Note the ideal_cycle_s / 2: grouping summed the cycle time over two days, so dividing by the day count restores the per-part ideal time. That is the sort of silent error that grouping introduces, and catching it is exactly the checking habit you already have. Output:

text
       availability  performance  quality    oee
shift
A             0.943        0.956    0.986  0.888
B             0.880        0.929    0.978  0.799
C             0.792        0.888    0.944  0.664

Shift C loses on all three factors, but mostly on availability. You would have guessed that from the floor. The code is not telling you anything new yet — and that is the point of this step.

Then ask a question the chart cannot answer

A control chart tells you a process has shifted. It does not tell you whether tomorrow's shift C will lose more than 90 minutes. That is a prediction problem, and it is where you begin learning data science proper:

  1. 1Build a table where each row is one shift, with features known before the shift starts: machine age since last overhaul, tool changes due, operator experience band, the previous shift's downtime, material batch.
  2. 2The target is next shift's downtime minutes, or a flag for "more than 60 minutes".
  3. 3Split by time, never randomly. Train on the earlier weeks and test on the later ones, because in a plant the future must not leak into the past.
  4. 4Compare your model against a simple rule, such as "predict the same downtime as the last shift". If you cannot beat that, say so.

The Data Science programme covers Python, SQL, statistics and model validation in that order, which is the order you need.

What you are missing, specifically

I would not pretend the gap is small:

  • Python and SQL fluency — pandas, joins, reading messy exports from an MES or ERP.
  • Machine learning evaluation — train/test splits, leakage, choosing a metric from costs. Your SPC knowledge helps with the statistics but not with this.
  • Working with far more features than a control chart has — dozens of columns, missing values, categories.
  • Explaining models, not processes — why the model flagged this shift.

Manufacturing analytics before generalist data science

A pure data scientist title at a consumer internet company would throw away your advantage. Look instead for manufacturing data analyst, process data analyst, quality analytics engineer or data scientist — operations at manufacturers, auto suppliers and industrial software firms. Read each description for words like OEE, SPC, predictive maintenance or MES; those tell you the team values the floor. The free skill check will show whether your CV already surfaces those terms or buries them under job duties.

Leaving the shop floor without disowning it

I've maintained SPC charts and OEE reports for two machining lines for six years, so I'm used to separating real signals from noise and acting on them. What the charts couldn't do was warn me before a bad shift. I rebuilt our OEE calculation in Python to check I could trust the tools, then built a model to predict downtime for the next shift from things we know before it starts, split by time so nothing leaked. It beat a "same as last shift" baseline only modestly, and I can explain why. I want to do this work full-time, ideally close to manufacturing.

Replace the baseline sentence with whatever your own project actually showed; a modest honest result survives follow-up questions, an inflated one does not.

Write back when your OEE numbers match your Excel sheet. That is the first milestone, and it is closer than you think.

Frequently asked questions

Can a mechanical engineer become a data scientist?

A mechanical engineer has a real head start on statistics, measurement and process thinking, especially if they have worked with SPC or quality systems. The gaps are usually Python, SQL and machine learning evaluation. A portfolio project built on plant-style data you understand is the most convincing bridge.

What is a good first data science project for a mechanical engineer?

Compute OEE by shift from a synthetic production log, add control limits to cycle-time data, and then try to predict which shifts will lose the most availability from their downtime history. It shows you can move from descriptive plant metrics to a predictive question.

PK
Pankit Kumar
Lead Instructor, NeuraPath Academy

Pankit Kumar has 10 years in Data Science & AI, building and shipping production systems in regulated pharma and clinical environments. He is a freelance trainer at Boston Institute of Analytics, AnalytixLabs and Scaler, and has taught this material to thousands of working professionals.

This article is part of our Data Science programme — 6 months. From data foundations to machine learning, deep learning and deployment.

Explore Data Science
Counselling is free · no obligation

Not sure which programme fits?

Tell us your background and we will map it to the right entry point — including saying so when a cheaper programme is the better fit. A counsellor replies within one working day.