Data Science & Machine Learning
前往频道在 Telegram
Join this channel to learn data science, artificial intelligence and machine learning with funny quizzes, interesting projects and amazing resources for free For collaborations: @love_data
显示更多📈 Telegram 频道 Data Science & Machine Learning 的分析概览
频道 Data Science & Machine Learning (@datasciencefun) 英语 语言赛道中的 是活跃参与者。目前社区聚集了 77 285 名订阅者,在 教育 类别中位列第 2 004,并在 印度 地区排名第 4 033 位。
📊 受众指标与增长动态
自 невідомо 创建以来,项目保持高速增长,吸引了 77 285 名订阅者。
根据 27 八月, 2026 的最新数据,频道保持稳定运转。过去 30 天订阅人数变化为 372,过去 24 小时变化为 1,整体触达仍然可观。
- 认证状态: 未认证
- 互动率 (ER): 平均受众互动率为 2.60%。内容发布后 24 小时内通常能获得 1.12% 的反应,占订阅者总量。
- 帖子覆盖: 每篇帖子平均可获得 2 009 次浏览,首日通常累积 866 次浏览。
- 互动与反馈: 受众积极参与,单帖平均反应数为 3。
- 主题关注点: 内容集中在 learning, accuracy, distribution, panda, dataset 等核心主题上。
📝 描述与内容策略
作者将该频道定位为表达主观观点的平台:
“Join this channel to learn data science, artificial intelligence and machine learning with funny quizzes, interesting projects and amazing resources for free
For collaborations: @love_data”
凭借高频更新(最新数据采集于 28 八月, 2026),频道始终保持新鲜度与高覆盖。分析显示受众积极互动,使其成为 教育 类别中的关键影响点。
77 285
订阅者
+124 小时
+127 天
+37230 天
帖子存档
🚀 Data Science Roadmap 2026
📘 Phase 1: Programming Fundamentals
🐍 Topic 8: Python List Comprehensions
Welcome back! 👋
In the previous lesson, you learned about Python's built-in data structures—Lists, Tuples, Sets, and Dictionaries.
Now it's time to learn one of Python's most elegant and frequently used features: List Comprehensions.
List comprehensions provide a concise and readable way to create, filter, and transform lists. They are widely used in Data Science, Machine Learning, data preprocessing, and coding interviews.
🔹 1. What is a List Comprehension?
A list comprehension is a compact way to create a new list by applying an expression to each item in an iterable (such as a list, tuple, or range).
Instead of writing multiple lines with a loop, you can accomplish the same task in a single line.
General Syntax
new_list = [expression for item in iterable]
🔹 2. Creating a List Using a Loop
numbers = []
for i in range(5):
numbers.append(i)
print(numbers)
Output
[0, 1, 2, 3, 4]
🔹 3. Creating the Same List Using List Comprehension
numbers = [i for i in range(5)]
print(numbers)
Output
[0, 1, 2, 3, 4]
Notice how the code is shorter and easier to read.
🔹 4. Performing Calculations
Create a list of squares.
squares = [x ** 2 for x in range(1, 6)]
print(squares)
Output
[1, 4, 9, 16, 25]
🔹 5. Using Conditions
You can filter elements while creating a list.
Example: Even Numbers
even_numbers = [x for x in range(1, 11) if x % 2 == 0]
print(even_numbers)
Output
[2, 4, 6, 8, 10]
🔹 6. Converting Strings
Convert all names to uppercase.
names = ["rahul", "deepak", "anita"]
upper_names = [name.upper() for name in names]
print(upper_names)
Output
['RAHUL', 'DEEPAK', 'ANITA']
🔹 7. Using Conditional Expressions
Replace negative numbers with zero.
numbers = [5, -2, 8, -1, 3]
updated = [0 if x < 0 else x for x in numbers]
print(updated)
Output
[5, 0, 8, 0, 3]
🔹 8. Nested List Comprehension
Create a multiplication table.
table = [[i * j for j in range(1, 6)] for i in range(1, 4)]
print(table)
Output
[[1, 2, 3, 4, 5],
[2, 4, 6, 8, 10],
[3, 6, 9, 12, 15]]
🔹 9. Real-World Data Science Example
Suppose you have a list of sales amounts.
sales = [1200, 850, 1500, 600, 2000]
high_sales = [sale for sale in sales if sale > 1000]
print(high_sales)
Output
[1200, 1500, 2000]
This technique is commonly used while cleaning and filtering datasets before analysis.
🔹 10. Benefits of List Comprehensions
✅ Shorter code
✅ Easier to read
✅ Faster than traditional loops in many cases
✅ Widely used in Data Science and Machine Learning
🔹 11. Common Mistakes
❌ Forgetting the Expression
numbers = [for i in range(5)] # SyntaxError
Correct:
numbers = [i for i in range(5)]
❌ Incorrect Order of "if"
numbers = [if x % 2 == 0 x for x in range(10)] # SyntaxError
Correct:
numbers = [x for x in range(10) if x % 2 == 0]𝗔𝗜 & 𝗗𝗮𝘁𝗮 𝗦𝗰𝗶𝗲𝗻𝗰𝗲 𝗣𝗿𝗼𝗴𝗿𝗮𝗺 (𝗡𝗼 𝗖𝗼𝗱𝗶𝗻𝗴 𝗡𝗲𝗲𝗱𝗲𝗱)
Apply Now👉:- https://pdlink.in/4aYWald
By E&ICT Academy, IIT Roorkee
Batch Closing Soon - 26th July 2026
What will be the output of the following code?
numbers = {1, 2, 2, 3, 4, 4}
print(len(numbers))
Which data structure stores only unique elements?
Which Python data structure is ordered, mutable, and allows duplicate values?
🚀 𝗖𝗶𝘀𝗰𝗼 𝗙𝗥𝗘𝗘 𝗧𝗲𝗰𝗵 𝗖𝗼𝘂𝗿𝘀𝗲𝘀 | 𝟱 𝗠𝘂𝘀𝘁-𝗗𝗼 𝗖𝗼𝘂𝗿𝘀𝗲𝘀 🎓
Cisco offers learning opportunities covering some of the most valuable foundations for careers in Cybersecurity, Networking, Linux and IoT.
✅ Beginner-Friendly Tech Skills
✅ Learn In-Demand IT Concepts
✅ Build Practical Knowledge
✅ Strengthen Your Resume
✅ Great for Students & Freshers
𝗘𝗻𝗿𝗼𝗹𝗹 𝗙𝗼𝗿 𝗙𝗥𝗘𝗘👇:-
https://pdlink.in/4fhCSKo
🔥 Learn from Cisco • Build Skills • Upgrade Your Resume • Get Career-Ready!
student = {
"name": "Rahul",
"age": 23
}
print(student.keys())
print(student.values())
print(student.items())
🔹 8. Real-World Data Science Example
Suppose you have student information.
students = [
{"name": "Amit", "marks": 90},
{"name": "Sara", "marks": 85}
]
for student in students:
print(student["name"], student["marks"])
Output
Amit 90
Sara 85
This is very similar to how records are stored before converting them into a Pandas DataFrame.
🔹 9. Common Mistakes
❌ Trying to Modify a Tuple
colors = ("Red", "Green")
colors[0] = "Blue"
This raises a TypeError because tuples are immutable.
❌ Accessing a Missing Dictionary Key
student = {"name": "John"}
print(student["age"])
This raises a KeyError.
A safer approach:
print(student.get("age"))
🎯 Practice Questions
1. Create a list of five cities and print the third city.
2. Create a tuple containing the days of the week.
3. Remove duplicate numbers from a list using a set.
4. Create a dictionary containing your name, age, and profession.
5. Print all keys and values of a dictionary using a loop.
🎯 Key Takeaways
✅ Lists are ordered and mutable.
✅ Tuples are ordered and immutable.
✅ Sets store only unique values.
✅ Dictionaries store data as key-value pairs.
✅ Dictionaries and Lists are the most commonly used data structures in Data Science.
Mastering these four data structures will make it much easier to work with datasets, APIs, JSON files, and machine learning projects.
Double Tap ❤️ For Part-8
-----
1.28 ₽ · /balance_help🚀 Data Science Roadmap 2026
📘 Phase 1: Programming Fundamentals
🐍 Topic 7: Python Data Structures (Lists, Tuples, Sets & Dictionaries)
Welcome back! 👋
So far, you've learned variables, operators, input/output, conditional statements, loops, and functions. Now it's time to learn one of the most important topics in Python— Data Structures.
Data structures help us store, organize, and manage data efficiently. In Data Science, almost every dataset you work with will be stored or manipulated using these structures.
Python provides four built-in data structures:
• List
• Tuple
• Set
• Dictionary
Let's understand each one in detail.
🔹 1. List
A List is an ordered, mutable collection that allows duplicate values.
Creating a List
fruits = ["Apple", "Banana", "Mango"]
print(fruits)
Output
['Apple', 'Banana', 'Mango']
Accessing Elements
print(fruits[0])
print(fruits[2])
Output
Apple
Mango
Modifying a List
fruits[1] = "Orange"
print(fruits)
Output
['Apple', 'Orange', 'Mango']
Adding Elements
fruits.append("Grapes")
print(fruits)
Removing Elements
fruits.remove("Orange")
print(fruits)
🔹 2. Tuple
A Tuple is an ordered collection that cannot be modified after creation (immutable).
Creating a Tuple
colors = ("Red", "Green", "Blue")
print(colors)
Accessing Elements
print(colors[1])
Output
Green
Why Use Tuples?
Use tuples when your data should never change.
Examples:
• Months of the year
• Days of the week
• Fixed coordinates
🔹 3. Set
A Set is an unordered collection of unique elements.
Duplicate values are automatically removed.
Creating a Set
numbers = {1, 2, 2, 3, 4, 4, 5}
print(numbers)
Output
{1, 2, 3, 4, 5}
Adding Elements
numbers.add(6)
Removing Elements
numbers.remove(3)
Common Uses
• Remove duplicates
• Membership testing
• Mathematical set operations
🔹 4. Dictionary ⭐
A Dictionary stores data as key-value pairs.
It is one of the most frequently used data structures in Data Science.
Creating a Dictionary
student = {
"name": "Deepak",
"age": 24,
"course": "Data Science"
}
print(student)
Accessing Values
print(student["name"])
Output
Deepak
Adding a New Key
student["city"] = "Mumbai"
Updating a Value
student["age"] = 25
Removing a Key
del student["course"]
🔹 5. Comparison of Data Structures
Feature | List | Tuple | Set | Dictionary
Ordered | ✅ | ✅ | ❌ | ✅
Mutable | ✅ | ❌ | ✅ | ✅
Duplicates Allowed | ✅ | ✅ | ❌ | Keys ❌
Indexed | ✅ | ✅ | ❌ | By Key
🔹 6. Common List Methods
numbers = [10, 20, 30]
numbers.append(40)
numbers.insert(1, 15)
numbers.remove(20)
numbers.sort()
print(numbers)
🔹 7. Common Dictionary Methods🚀 𝗔𝗜 & 𝗠𝗮𝗰𝗵𝗶𝗻𝗲 𝗟𝗲𝗮𝗿𝗻𝗶𝗻𝗴 𝗙𝗥𝗘𝗘 𝗖𝗲𝗿𝘁𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝗖𝗼𝘂𝗿𝘀𝗲🔥
Learn the most in-demand AI skills from scratch and strengthen your profile with industry-recognized certificates! 🎓
✅ Beginner-Friendly Courses
✅ Learn Online at Your Own Pace
✅ 100% FREE of cost
Perfect for Students, Freshers & Working Professionals looking to build a career in AI/ML. 💼
𝗘𝗻𝗿𝗼𝗹𝗹 𝗙𝗼𝗿 𝗙𝗥𝗘𝗘👇:-
https://pdlink.in/4phANS2
📢 Share this with your friends who want to start their AI career!
What will be the output of the following code?
def greet(): print("Hello") greet()
What will be the output of the following code?
def multiply(a, b):
return a * b print(multiply(4, 5))
Which of the following is a built-in Python function?
Which keyword is used to return a value from a function?
Which keyword is used to define a function in Python?
📈 𝗗𝗮𝘁𝗮 𝗔𝗻𝗮𝗹𝘆𝘁𝗶𝗰𝘀 𝗙𝗥𝗘𝗘 𝗖𝗲𝗿𝘁𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝗖𝗼𝘂𝗿𝘀𝗲😍
Data Analytics is one of the most in-demand skills in today’s job market 💻
✅ Beginner Friendly
✅ Industry-Relevant Curriculum
✅ Certification Included
✅ 100% Online
𝗘𝗻𝗿𝗼𝗹𝗹 𝗙𝗼𝗿 𝗙𝗥𝗘𝗘👇:-
https://pdlink.in/4wh2ugB
🎯 Don’t miss this opportunity to build high-demand skills!
🚀 Data Science Roadmap 2026
📘 Phase 1: Programming Fundamentals
🐍 Topic 6: Python Functions
So far, you've learned variables, operators, input/output, conditional statements, and loops. As your programs grow larger, writing the same code repeatedly becomes inefficient. That's where functions come in.
A function is a reusable block of code that performs a specific task. Functions make your code cleaner, easier to maintain, and reusable.
Functions are heavily used in Data Science, Machine Learning, and AI because they allow you to organize complex workflows into smaller, manageable pieces.
🔹 1. What is a Function?
A function is a named block of code that executes only when it is called.
Instead of writing the same logic multiple times, you write it once inside a function and reuse it whenever needed.
Example
def greet():
print("Welcome to Data Science!")
greet()
Output
Welcome to Data Science!🔹 2. Why Do We Use Functions? Functions help you: ✅ Avoid writing duplicate code ✅ Improve code readability ✅ Make debugging easier ✅ Reuse code in multiple places ✅ Build modular applications 🔹 3. Defining a Function Syntax
def function_name():
# Function body
Example:
def welcome():
print("Hello, World!")
welcome()
🔹 4. Function Parameters
Parameters allow you to pass information into a function.
def greet(name):
print("Hello", name)
greet("Deepak")
Output
Hello DeepakHere, "name" is called a parameter. 🔹 5. Function Arguments When calling a function, the values you pass are called arguments.
def square(number):
print(number * number)
square(5)
Output
25Here: • "number" → Parameter • "5" → Argument 🔹 6. Returning Values A function can return a value using the return keyword.
def add(a, b):
return a + b
result = add(10, 20)
print(result)
Output
30Using return allows the function's result to be stored or used later. 🔹 7. Default Parameters You can assign default values to parameters.
def greet(name="Guest"):
print("Hello", name)
greet()
greet("Rahul")
Output
Hello Guest Hello Rahul🔹 8. Multiple Return Values A function can return more than one value.
def calculate(a, b):
return a + b, a * b
sum_value, product = calculate(4, 5)
print(sum_value)
print(product)
Output
9 20🔹 9. Scope of Variables Variables created inside a function are called local variables.
def demo():
message = "Inside Function"
print(message)
demo()
Trying to access
messageoutside the function will produce an error because it exists only inside the function. 🔹 10. Built-in Functions Python provides many ready-to-use functions. Examples:
numbers = [5, 2, 8, 1]
print(len(numbers))
print(max(numbers))
print(min(numbers))
print(sum(numbers))
Output
4 8 1 16🔹 11. Real-World Data Science Example Calculate the average marks of students.
def average(marks):
return sum(marks) / len(marks)
scores = [80, 75, 92, 88]
print(average(scores))
Output
83.75Functions like this are commonly used while cleaning data, calculating statistics, and building machine learning pipelines. 🔹 12. Common Mistakes ❌ Forgetting to Call the Function
def greet():
print("Hello")
# Nothing happens because the function isn't called.
Correct:
greet()
❌ Forgetting to Return a Value
def add(a, b):
a + b
# Correct:
def add(a, b):
return a + b
🎯 Practice Questions
1. Write a function to add two numbers.
2. Create a function to calculate the square of a number.
3. Write a function that checks whether a number is even or odd.
4. Create a function to calculate the average of a list.
5. Write a function that returns the largest of three numbers.
Double Tap ❤️ For Part-7Final 6 Hours Left!
To register for TiHAN IIT Hyderabad's AI & ML Program.
Don't miss your chance to:
• Learn from India's best scientists at TiHAN, IIT Professors and industry experts
• Direct Interview at TiHAN IIT Hyderabad with 9+ CGPA
Register before the Admission Closes!
Data is the fuel but AI is the Machinery.
The people who know how to use both will lead the future.
Become one with TiHAN IIT Hyderabad's AI & ML Program.
✅ Learn live from TiHAN scientists, IIT professors & industry experts
✅ Build hands-on projects with Flipkart & Mamaearth
✅ Assured interview at TiHAN IIT Hyderabad with 9+ CGPA
✅ Placement support across 5000+ companies through Masai
Online Entrance Exam: 19th July
🔗 Register: https://tinyurl.com/datasimplifier-17jul-tihan-006
What is the output of the following code?
total = 0
for i in range(1, 4): total += i print(total)
