Introduction to Pandas
Pandas is the most widely used Python library for working with structured, tabular data - the kind of row-and-column data you'd normally find in a spreadsheet or a database table. If NumPy gave you fast numerical arrays, Pandas gives you a powerful, flexible way to work with real-world, labeled data.
Why Pandas Exists
While NumPy arrays are excellent for pure numerical computation, real-world data is rarely just numbers - it has column names, mixed data types, missing values, and needs to be filtered, grouped, and reshaped constantly. Pandas was built specifically to handle exactly these kinds of everyday, messy, real-world data tasks.
Installing and Importing Pandas
pip install pandas
import pandas as pd
print(pd.__version__)
A Quick First Look
import pandas as pd
data = {
"Name": ["Abhay", "Priya", "Rohit"],
"Score": [85, 92, 78]
}
df = pd.DataFrame(data)
print(df)
# Name Score
# 0 Abhay 85
# 1 Priya 92
# 2 Rohit 78
Coming Up Next
Next, you'll learn about the two core data structures in Pandas - the Series and the DataFrame - and how they organize data.