Formation
90 min read
Data Manipulation with Pandas
π¦ Introduction to Pandas (DataFrames)
Learning objectives
π― Objectives:\n
1Install and import Pandas\n2. Create DataFrames\n3. Load CSV/Excel data\n4. Explore data
Introduction
π Pandas is the essential library for data analysis in Python.
Theoretical content
Pandas - DataFrame:\n
PYTHON
\nimport pandas as pd\ndf = pd.DataFrame({"name": ["Alice"], "age": [25]})\nPractical examples
π» Example: Data analysis\n
PYTHON
\nimport pandas as pd\ndf = pd.DataFrame({"month": ["Jan"], "sales": [1000]})\nBest practices
1Always import pandas as pd\nβ
2. Use head() for preview\nβ
3. Use info() for structure\nβ
4. Use describe() for statistics
Common pitfalls
Forgetting to install pandas\n
pip install pandas
Summary
Pandas: analysis library\nβ
DataFrame: 2D table\nβ
read_csv(): load CSV\nβ
head(): preview\nβ
info(): structure\nβ
describe(): statistics
Additional resources
π pandas.pydata.org/docs