Pandas is an open-source Python library used for data manipulation and analysis. It provides high-performance, easy-to-use data structures, such as DataFrame and Series, and tools for working with structured data.
Key Features of Pandas
- Data Structures: Provides two main data structures—
Series
(1D) andDataFrame
(2D). - Data Handling: Handles missing data, filtering, grouping, and merging efficiently.
- Data Import & Export: Supports CSV, Excel, SQL, JSON, and more.
- Data Analysis & Visualization: Enables easy analysis with statistical functions and integrates well with Matplotlib and Seaborn.
Installation
To install Pandas, use:
pip install pandas
Basic Example
import pandas as pd
# Creating a simple DataFrame
data = {'Name': ['Alice', 'Bob', 'Charlie'], 'Age': [25, 30, 35]}
df = pd.DataFrame(data)
print(df)
Output:
Name Age
0 Alice 25
1 Bob 30
2 Charlie 35