TExcelTAD
Home › Data Science › DS Introduction

DS Introduction

Data science is the craft of turning raw records into answers you can act on. A data scientist collects data, cleans it, explores it, builds a model that explains or predicts something, and finally tells other people what was found — clearly and honestly.

It sits where three skills meet:

Skill What it contributes
Programming Loading, reshaping and analysing thousands of rows without doing it by hand
Mathematics & statistics Knowing which summary, test or model fits the question, and how much to trust it
Domain knowledge Understanding what the numbers mean in the real world

The running example: Riverside Bikes

Throughout this course we work for Riverside Bikes, an (invented) bike-share service in a small river town. Every day the system logs how many bikes were rented, together with the weather. The manager has questions such as:

  • Do warm days really bring more riders — and how many more per degree?
  • How much does rain hurt business?
  • Are weekends different from weekdays?
  • How many bikes should be on the street tomorrow?

By the end of the course you'll answer all of these with Python, statistics and linear regression. Here is a first taste: a week and a half of daily rentals.

python · try it yourself
rides = [414, 298, 439, 405, 254, 523, 497, 428, 209, 368]

print("Days recorded:", len(rides))
print("Total rides:", sum(rides))
print("Busiest day:", max(rides))
print("Quietest day:", min(rides))
print("Average per day:", sum(rides) / len(rides))
Days recorded: 10
Total rides: 3835
Busiest day: 523
Quietest day: 209
Average per day: 383.5

Plain Python can already summarise a list. As soon as the data has several columns, though, you'll want proper tools.

The tools in this course

Every playground on this site runs real Python in your browser, with the standard data-science libraries preinstalled:

Library Used for
NumPy Fast arrays and maths on whole columns at once
pandas Tables (DataFrame) — loading, cleaning, grouping
Matplotlib / seaborn Charts
SciPy Statistical functions and tests
statsmodels Regression with detailed statistical output

A first glimpse of pandas: the same rentals, now with the temperature next to them.

python · try it yourself
import pandas as pd

days = pd.DataFrame({
    "temp_c": [24.1, 15.4, 26.3, 22.1, 6.4, 29.4, 23.8, 24.4, 7.3, 15.7],
    "rides":  [414, 298, 439, 405, 254, 523, 497, 428, 209, 368],
})
print(days.head(3))
print()
print("Mean rides on days above 20 °C:", days[days["temp_c"] > 20]["rides"].mean())
print("Mean rides on days at or below 20 °C:", days[days["temp_c"] <= 20]["rides"].mean())
   temp_c  rides
0    24.1    414
1    15.4    298
2    26.3    439

Mean rides on days above 20 °C: 451.0
Mean rides on days at or below 20 °C: 282.25

Even ten days hint at a pattern: warm days are busier. Later lessons turn that hunch into a number with a margin of error.

What a data scientist actually does

Most of the time is not spent on fancy models. A typical project looks like this:

  1. Ask a precise question ("How many extra rides does one degree bring?").
  2. Collect the data that can answer it.
  3. Prepare it — fix types, handle missing values, remove impossible records.
  4. Explore it with summaries and charts.
  5. Model it — for example with a regression line.
  6. Communicate the answer, including its uncertainty and limits.

Note: Steps 2–4 often take 60–80 % of a project. Clean, well-understood data beats a clever model on messy data.

A tiny chart

Pictures reveal patterns faster than tables. Here is the rentals-versus-temperature relationship as a scatter plot:

python · try it yourself
import matplotlib.pyplot as plt

temp = [24.1, 15.4, 26.3, 22.1, 6.4, 29.4, 23.8, 24.4, 7.3, 15.7]
rides = [414, 298, 439, 405, 254, 523, 497, 428, 209, 368]

plt.scatter(temp, rides, color="#ff6f00")
plt.xlabel("Temperature (°C)")
plt.ylabel("Rides per day")
plt.title("Riverside Bikes: first 10 days")
plt.show()
print("Plotted", len(temp), "days")
Plotted 10 days

The points rise from left to right: higher temperature, more rides. In the "DS Math" and "DS Advanced" sections you'll fit a straight line through such points and interpret its slope.

How to use this course

  • Read each lesson, then edit and re-run the examples — change a number and predict the result first.
  • Every lesson ends with a short quiz. The course quiz page collects all of them.
  • The Exercises and Mini Project at the end put everything together.

Test yourself

Which three skill areas does data science combine?

  1. Networking, design and marketing
  2. Programming, statistics and domain knowledge
  3. Hardware, databases and security
  4. Writing, accounting and law

Which step usually takes the largest share of a real data science project?

  1. Choosing the model
  2. Collecting, preparing and exploring the data
  3. Writing the final slide
  4. Installing libraries

Which library provides the DataFrame table type?

  1. NumPy
  2. Matplotlib
  3. pandas
  4. SciPy