TGViewer
Python for Data Analysts Python for Data Analysts @pythonanalyst · 51.8K subscribers
Post #1302 6.1K
Python Libraries You Should Know ✅

⦁ NumPy: Numerical Computing ⚙️
NumPy is the foundation for numerical operations in Python. It provides fast arrays and math functions.

Example:
import numpy as np

arr = np.array([1, 2, 3])
print(arr * 2) # [2 4 6]


Challenge: Create a 3x3 matrix of random integers from 1–10.
matrix = np.random.randint(1, 11, size=(3, 3))
print(matrix)


⦁ Pandas: Data Analysis 🐼
Pandas makes it easy to work with tabular data using DataFrames.

Example:
import pandas as pd

data = {"Name": ["Alice", "Bob"], "Age": [25, 30]}
df = pd.DataFrame(data)
print(df)


Challenge: Load a CSV file and show the top 5 rows.
df = pd.read_csv("data.csv")
print(df.head())


⦁ Matplotlib: Data Visualization 📊
Matplotlib helps you create charts and plots.

Example:
import matplotlib.pyplot as plt

x = [1, 2, 3]
y = [2, 4, 1]

plt.plot(x, y)
plt.title("Simple Line Plot")
plt.show()


Challenge: Plot a bar chart of fruit sales.
fruits = ["Apples", "Bananas", "Cherries"]
sales = [30, 45, 25]

plt.bar(fruits, sales)
plt.title("Fruit Sales")
plt.show()


⦁ Seaborn: Statistical Plots 🎨
Seaborn builds on Matplotlib with beautiful, high-level charts.

Example:
import seaborn as sns
import matplotlib.pyplot as plt

tips = sns.load_dataset("tips")
sns.boxplot(x="day", y="total_bill", data=tips)
plt.show()


Challenge: Create a heatmap of correlation.
corr = tips.corr()
sns.heatmap(corr, annot=True, cmap="coolwarm")
plt.show()


⦁ Requests: HTTP for Humans 🌐
Requests makes it easy to send HTTP requests.

Example:
import requests

response = requests.get("https://api.github.com")
print(response.status_code)
print(response.json())


Challenge: Fetch and print your IP address.
res = requests.get("https://api.ipify.org?format=json")
print(res.json()["ip"])


⦁ Beautiful Soup: Web Scraping 🍜
Beautiful Soup helps you extract data from HTML pages.

Example:
from bs4 import BeautifulSoup
import requests

url = "https://example.com"
html = requests.get(url).text
soup = BeautifulSoup(html, "html.parser")

print(soup.title.text)


Challenge: Extract all links from a webpage.
links = soup.find_all("a")
for link in links:
print(link.get("href"))


Next Steps:
⦁ Combine these libraries for real-world projects
⦁ Try scraping data and analyzing it with Pandas
⦁ Visualize insights with Seaborn and Matplotlib

Double Tap ♥️ For More
  • ❤ 19
More from @pythonanalyst
  1. Oct 2, 2026Skills for data analyst
  2. Sep 24, 2026GigaChat 3.5 Reasoning is a new open-source LLM designed to reason before generating respo…
  3. Sep 23, 2026Understanding Popular ML Algorithms: 1️⃣ Linear Regression: Think of it as drawing a strai…
  4. Aug 22, 2026How to Become a Data Analyst from Scratch! 🚀 Whether you're starting fresh or upskilling,…
  5. Aug 20, 2026🚀 Top Python Careers You Should Know 🐍 Python Developer 🤖 AI / Machine Learning Enginee…
  6. Aug 13, 2026📊 Python for Data Science – Complete Beginner Roadmap 🐍🚀 🔹 What is Data Science? Data…
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 →