What is Data Science?
Data science is the craft of turning raw data into answers and decisions. It blends programming, statistics and real-world knowledge, and it sits behind things you use every day, from mobile-money fraud alerts to the "recommended for you" row on YouTube.
What is data science?
Every day, people and organisations create enormous amounts of data: shop receipts, M-Pesa transactions, exam results, clinic records, weather readings and social media posts. On its own, that data is just a pile of numbers and text. Data science is the process of collecting it, cleaning it, analysing it and explaining what it means, so that someone can make a better decision.
A helpful way to picture data science is as the overlap of three skills:
- Programming: using a language such as Python to load, reshape and analyse data much faster and more reliably than by hand.
- Mathematics and statistics: summarising data honestly and judging whether a pattern is real or just chance.
- Domain knowledge: understanding the field you work in (farming, retail, health, transport) so that you ask sensible questions and notice results that don't make sense.
Someone with only one of these skills struggles. A brilliant programmer who doesn't understand the business may answer the wrong question; an expert farmer without programming skills can't analyse ten years of harvest records. Data science brings the three together.
What does a data scientist actually do?
The job title sounds mysterious, but most of the work is practical:
- Asking a clear question: "Which products should our duka stock more of in December?"
- Finding and collecting data: from spreadsheets, databases, surveys, websites or sensors.
- Cleaning data: fixing typos, filling or removing missing values and removing duplicates. This is often the biggest part of a project.
- Exploring and analysing: calculating totals and averages, comparing groups and spotting trends.
- Visualising and communicating: turning results into charts and plain-language recommendations that a manager can act on.
- Sometimes building models: using machine learning to predict things, such as which customers are likely to stop buying.
A first taste in Python
Here is a tiny analysis of one week of sales at a small shop. Don't worry about every detail yet; pandas gets its own chapter later.
import pandas as pd
sales = pd.DataFrame({
"day": ["Mon", "Tue", "Wed", "Thu", "Fri"],
"revenue": [4200, 3800, 5100, 4700, 6900], # KES
})
print(sales["revenue"].mean()) # average daily revenue
print(sales.loc[sales["revenue"].idxmax(), "day"]) # best day
In two lines you learn that the shop averages KES 4,940 a day and that Friday is the best day. With a year of data, the same two lines still work, which is exactly why programming is so useful for data work.
Types of data
| Type | What it is | Examples |
|---|---|---|
| Numerical (quantitative) | Values you can measure or count and do arithmetic with | Price in KES, number of units sold, temperature |
| Categorical | Labels that place items into groups | County, product name, payment method |
| Date and time | When something happened | Transaction timestamp, harvest date |
| Text and media | Unstructured content | Customer reviews, photos of crops, voice notes |
Data arranged in rows and columns (like a spreadsheet) is called structured data. It is where most beginners start, and it is the focus of this series.
Where data science is used
| Field | Example question |
|---|---|
| Finance and mobile money | Does this transaction look like fraud? |
| Agriculture | Which fertiliser gives the best maize yield in this soil? |
| Health | Which clinics are running low on medicine stock? |
| Retail | Which products sell best in each county, and when? |
| Transport | Which matatu routes earn the most per trip? |
Data roles
| Role | Main focus |
|---|---|
| Data analyst | Answers business questions with summaries, charts and reports |
| Data scientist | Analysis plus statistics and predictive models |
| Data engineer | Builds the pipelines and databases that store and move data |
| Machine learning engineer | Puts models into real products and keeps them running |
This series assumes you know basic Python: variables, lists, dictionaries and functions. If those feel shaky, revise them first.
Key points
- Data science turns raw data into answers and decisions.
- It combines programming, statistics and domain knowledge.
- Most of the work is asking good questions, cleaning data, analysing it and explaining the results.
- Next, see how a project flows from start to finish in The Data Science Workflow.
Tip: use the ← and → keys to move between pages.
