1. Basic Installation & Data Loading
pandas is a fast, powerful, flexible, and easy-to-use open-source data analysis and manipulation tool, built on top of the Python programming language.
1.1. Installation
You can easily install pandas using pip, Python's package installer:
pip install pandas numpy
It's also recommended to install NumPy as pandas heavily relies on it.
1.2. Loading Data
pandas provides various functions to load data from different sources. The most common data structures are DataFrame (a 2-dimensional labeled data structure) and Series (a 1-dimensional labeled array).
Loading CSV Files
import pandas as pd
df = pd.read_csv('data.csv')
print(df.head())
Loading Excel Files
df_excel = pd.read_excel('data.xlsx', sheet_name='Sheet1')
print(df_excel.head())
Key Concept: A DataFrame is like a table, and each column is a Series.