How to Install Python, Jupyter Notebook and VS Code for Data Science (Windows and Mac)
P1.1 Why Python Is Used for Data Science
Why. Data work means reading files, cleaning numbers and making charts. Python does all three with short, readable code. Banks, hospitals, shops and delivery companies all use it, so one skill opens many jobs.
What. Python is a free programming language. You write instructions in plain-looking English words. A program called the Python interpreter reads them and runs them line by line.
- Interpreter — the program that runs your Python code.
- Library — ready-made code you can reuse, such as pandas or NumPy.
- Jupyter Notebook — a page in the browser where you run code in small boxes called cells.
- VS Code — a free code editor for bigger scripts and projects.
How.
How a line of Python runs
- You type a line of code.
- You press Run (or Shift+Enter in Jupyter).
- The interpreter reads the line.
- It does the work.
- It shows the result below the code.
Python next to other languages — print a greeting. You do not need to learn these other languages. This only shows why Python is easier to read.
| Language | Code |
|---|---|
| Python | print("Hello") |
| Java | System.out.println("Hello"); (inside a class and a main method) |
| JavaScript | console.log("Hello"); |
| Go | fmt.Println("Hello") (inside package main and func main) |
Worked example A — The smallest Python program.
Step 1 — What we do. We print one line of text to check that Python works.
Step 2 — Type and run this code.
print("Hello from Python")
Step 3 — Output you should see.
Hello from Python
Step 4 — What it means. print() shows whatever is inside the brackets. Text must be inside quotes.
Worked example B — Python as a calculator.
Step 1 — What we do. A shop in London sold 3 shirts at £12.50 each. We let Python do the maths.
Step 2 — Type and run this code.
print(3 * 12.50)
Step 3 — Output you should see.
37.5
Step 4 — What it means. * means multiply. Python gives 37.5, which is £37.50. You will use Python like this every day for quick checks.
Ravindra Bagale's Tip
Do not try to learn all of Python before data work. Learn the basics in these 13 chapters, then start pandas. You will keep learning Python while you analyse data.
Ravindra Bagale's Tip – मराठी
Data work आधी सगळा Python शिकायचा प्रयत्न करू नका. या 13 chapters मधला basics शिका, मग pandas सुरू करा. Data analyse करताना Python आपोआप शिकत राहाल.
Ravindra Bagale's Tip – हिंदी
Data work से पहले पूरा Python सीखने की कोशिश मत करो. इन 13 chapters का basics सीखो, फिर pandas शुरू करो. Data analyse करते हुए Python अपने आप सीखते रहोगे.