0% found this document useful (0 votes)
6 views3 pages

Pandas Notes

Uploaded by

SIVAVEDATHRI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Pandas Notes

Uploaded by

SIVAVEDATHRI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Pandas Notes

Introduction
• Pandas is a Python library for data manipulation and analysis.
• Built on top of NumPy.
• Provides two main data structures:
• Series: 1D labeled array.
• DataFrame: 2D labeled data table.

Series
• One-dimensional, like a column.
• Can store integers, floats, strings, etc.

import pandas as pd
s = [Link]([10, 20, 30], index=["a", "b", "c"])
print(s)

DataFrame
• Two-dimensional table with rows and columns.

import pandas as pd
data = {
"Name": ["Alice", "Bob", "Charlie"],
"Age": [25, 30, 35]
}
df = [Link](data)
print(df)

Key Operations
• Reading/Writing Data:

df = pd.read_csv("[Link]")
df.to_excel("[Link]")

1
• Exploring Data:

[Link]()
[Link]()
[Link]()

• Selection:

df["Name"] # Column

[Link][0] # By label

[Link][0] # By position

• Filtering:

df[df["Age"] > 28]

• GroupBy & Aggregation:

[Link]("Age").mean()

Handling Missing Data

[Link](0)
[Link]()

Merging & Joining

[Link](df1, df2, on="id")

2
Visualization with Pandas

df["Age"].plot(kind="hist")

Conclusion
• Pandas simplifies data cleaning, transformation, and analysis.
• Works seamlessly with NumPy, Matplotlib, and Seaborn.

You might also like