Popular Python Libraries
This lesson presents the most used Python libraries for data processing, visualization, GUI, games, and automation. Each library comes with examples and practical applications.
numpy and pandas - Data Processing
- numpy: working with arrays, fast mathematical operations
- pandas: manipulating data tables (DataFrame), import/export CSV, filtering
import numpy as np
import pandas as pd
a = np.array([1, 2, 3])
df = pd.DataFrame({"Name": ["John", "Maria"], "Age": [25, 30]})
print(df)
matplotlib - Charts and Visualizations
- Creating line charts, bar charts, histograms, etc.
- Ideal for visual analysis and reporting
import matplotlib.pyplot as plt
x = [1, 2, 3]
y = [2, 4, 6]
plt.plot(x, y)
plt.title("Simple Chart")
plt.show()
requests - Working with APIs
- Send HTTP requests to servers
- Ideal for web scraping, integration with external services
import requests
r = requests.get("https://api.github.com")
print(r.status_code)
print(r.json())
tkinter - Graphical Interfaces
- Create windows, buttons, text fields
- Ideal for simple desktop applications
import tkinter as tk
root = tk.Tk()
root.title("Hello, John!")
tk.Label(root, text="Welcome!").pack()
root.mainloop()
pygame - 2D Games
- Create games with graphics, sound, and interaction
- Ideal for creative and educational projects
import pygame
pygame.init()
screen = pygame.display.set_mode((400, 300))
pygame.display.set_caption("John's Game")
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
pygame.quit()
Congratulations on completing the Python course! You have built a solid foundation for modern Python development, explored the essential tools that turn code into a real, scalable, and deployable application.
But the real journey is just beginning. As you deepen your concepts and expand your skills, you will discover new challenges, technologies, and opportunities. Our platform continues to provide valuable resources to help you move forward.
Keep learning, experimenting, and creating. Your future as a developer is built with every line of code.