TGViewer
Data Science & Machine Learning Data Science & Machine Learning @datasciencefun ยท 77.8K subscribers
Post #4413 2.33K
๐Ÿš€ Data Science Roadmap 2026

๐Ÿ“˜ Phase 1: Programming Fundamentals

๐Ÿ Topic 1: Python Basics โ€“ Variables & Data Types

Welcome to the Complete Data Science Roadmap! ๐ŸŽ‰

Over the coming lessons, we'll learn everything you need to become a job-ready Data Scientistโ€”from Python and SQL to Machine Learning, Deep Learning, Generative AI, and MLOps.

Today, we're starting with the first and most important topic of the roadmap: Python Basics โ€“ Variables & Data Types.

Python is the most widely used programming language in Data Science because it is easy to learn, highly readable, and supported by powerful libraries such as NumPy, Pandas, Matplotlib, Scikit-learn, TensorFlow, and PyTorch.

Before building machine learning models or analyzing data, you must understand how Python stores and manages data. Every Python program begins with variables and data types, making them the foundation of your Data Science journey.

๐Ÿ”น 1. What is Python?

Python is a high-level, interpreted programming language used for:

โœ… Data Science

โœ… Machine Learning

โœ… Artificial Intelligence

โœ… Data Analysis

โœ… Automation

โœ… Web Development

๐Ÿ”น 2. What is a Variable?

A variable is a named container used to store data in memory.

Think of a variable like a labeled box. You store information inside the box, and whenever you need that information later, you simply use the label (variable name).

For example:

name = "Aman"
age = 25
salary = 175000


Here:

โ€ข "name" stores a string.

โ€ข "age" stores an integer.

โ€ข "salary" stores a numeric value.

๐Ÿ”น 3. Rules for Naming Variables

โœ… Valid Rules

โ€ข Must begin with a letter or underscore ("_")

โ€ข Can contain letters, numbers, and underscores

โ€ข Variable names are case-sensitive

Examples:

student_name = "Rahul"
marks = 90
age2 = 24


โŒ Invalid Examples

2name = "Rahul"
student name = "Rahul"
class = 10


Why?

โ€ข Cannot start with a number

โ€ข Spaces are not allowed

โ€ข "class" is a reserved Python keyword

๐Ÿ”น 4. What are Data Types?

A data type tells Python what kind of value a variable stores.

Python automatically detects the data type when you assign a value.

Data Types in Python:

int: Whole numbers Example: 25

float : Decimal numbers Example: 99.99

str: Text

Example: "Python"

bool: True or False

complex: Complex numbers

Example: 3+4j

๐Ÿ”น 5. Integer (int)

Stores whole numbers.

age = 25
print(age)
print(type(age))


Output:

25
<class 'int'>


๐Ÿ”น 6. Float (float)

Stores decimal numbers.

price = 199.99
print(price)
print(type(price))


Output:

199.99
<class 'float'>


๐Ÿ”น 7. String (str)

Stores text.

name = "Suresh"
print(name)
print(type(name))


Output:

Deepak
<class 'str'>


Strings can be written using either single (' ') or double (" ") quotes.

๐Ÿ”น 8. Boolean (bool)

Boolean values are used for decision-making.

They can store only two values: True or False

is_student = True
print(type(is_student))


Output:

<class 'bool'>


๐Ÿ”น 9. Complex Numbers

Python also supports complex numbers.

number = 3 + 4j
print(type(number))


Output:

<class 'complex'>


Although rarely used in Data Science, they are useful in scientific and mathematical computations.

๐Ÿ”น 10. Checking the Data Type

Use the type() function.

salary = 50000
print(type(salary))


Output:
  • โค 10
  • ๐Ÿ‘ 2
  • ๐Ÿ‘ 2
More from @datasciencefun
  1. Oct 7, 2026ORDER BY salary DESC LIMIT 5; Mistake 3 โ€” Forgetting that LIMIT applies after sorting Forโ€ฆ
  2. Oct 7, 2026๐Ÿš€ Data Science Roadmap 2026 ๐Ÿ“ Phase 3: SQL for Data Science ๐Ÿ“– Topic 4 โ€” LIMIT LIMIT isโ€ฆ
  3. Oct 7, 2026๐Ÿš€๐—ฃ๐—ฎ๐˜† ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—ง๐—ฟ๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด | ๐—•๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฎ ๐—™๐˜‚๐—น๐—น๐˜€๐˜๐—ฎ๐—ฐโ€ฆ
  4. Oct 7, 2026๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ ๐—ฃ๐—ผ๐˜„๐—ฒ๐—ฟ ๐—•๐—œ ๐—ณ๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜! ๐Ÿ”ฅ Learn Power BI through these FREE learninโ€ฆ
  5. Oct 2, 2026Data Visualisation tips for beginners
  6. Sep 29, 2026๐—™๐—ฅ๐—˜๐—˜ ๐—ฅ๐—ฒ๐˜€๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ๐˜€ ๐—ง๐—ผ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป ๐—”๐—œ ๐—ถ๐—ป ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ๐Ÿš€ โ€‹ Explore 6 free resourceโ€ฆ
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’