Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Probability Distributions Cheat Sheet.pdf
2.6 MB
Please open Telegram to view this post
VIEW IN TELEGRAM
π 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:
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:
β Invalid Examples
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.
Output:
πΉ 6. Float (float)
Stores decimal numbers.
Output:
πΉ 7. String (str)
Stores text.
Output:
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
Output:
πΉ 9. Complex Numbers
Python also supports complex numbers.
Output:
Although rarely used in Data Science, they are useful in scientific and mathematical computations.
πΉ 10. Checking the Data Type
Use the type() function.
Output:
π 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:
<class 'int'>
πΉ 11. Type Conversion (Casting)
Sometimes you need to convert one data type into another.
String β Integer
age = "25"
print(int(age))
Integer β Float
marks = 95
print(float(marks))
Float β Integer
price = 199.99
print(int(price)) # Output: 199
Integer β String
number = 100
print(str(number))
πΉ 12. Multiple Variable Assignment
Assign multiple variables in one line.
x, y, z = 10, 20, 30
Assign the same value to multiple variables.
a = b = c = 100
πΉ 13. Dynamic Typing
Python is dynamically typed.
This means a variable can store different data types at different times.
x = 10
x = "Data Science"
print(x)
# Output: Data Science
πΉ 14. Best Practices
β Use meaningful variable names.
student_name = "Rahul"
monthly_salary = 50000
Instead of:
a = "Rahul"
b = 50000
Follow the snake_case naming convention.
Examples: customer_name, total_sales, average_salary
πΉ 15. Real-World Example
name = "Rohit"
age = 25
salary = 65000.50
is_employee = True
print(name)
print(age)
print(salary)
print(is_employee)
Output:
Rohit
25
65000.5
True
π― Key Takeaways
β Variables are used to store data.
β Python automatically detects data types.
β The most common data types are: int, float, str, bool, complex
β Use type() to check a variable's data type.
β Use meaningful variable names and follow the snake_case naming convention.
Mastering variables and data types is the first step toward becoming a successful Data Scientist. Every machine learning model, data analysis project, and AI application starts with understanding how data is stored and managed in Python.
Double Tap β€οΈ For More
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Ex_Files_Advanced_Tableau_Desktop.zip
178.6 MB
Please open Telegram to view this post
VIEW IN TELEGRAM