Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
Table of Contents
TogglePython is powerful because of its libraries. In this lesson, you’ll learn to import and use two essential libraries for Machine Learning: NumPy (for numerical operations) and Pandas (for handling datasets).
NumPy stands for Numerical Python. It’s used for fast array operations and mathematical functions.
import numpy as np
arr = np.array([1, 2, 3])
print(arr * 2)
Output: [2 4 6]
Pandas is used for working with data in the form of DataFrames — tables with rows and columns.
import pandas as pd
df = pd.read_csv('data.csv')
print(df.head())
Output: Displays first 5 rows of your dataset.
np.array() do?👉 Up next: Let’s visualize your data using **Matplotlib and Seaborn** — the charting tools of Python!
