You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 35 Day Pandas Basic/CaseStudy.md
+150Lines changed: 150 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -74,3 +74,153 @@ This case study demonstrates common Pandas operations:
74
74
8. Customer behavior analysis
75
75
9. Filtering for specific conditions
76
76
10. Exporting results to CSV files
77
+
78
+
---------------------------------
79
+
80
+
81
+
# Pandas Step-by-Step Example Guide
82
+
*Updated: June 25, 2025*
83
+
84
+
## 1. What is Pandas?
85
+
Pandas is a powerful Python library for data manipulation and analysis. It provides data structures like Series and DataFrames, which are ideal for handling structured data, such as tabular data, time series, and more.
86
+
87
+
```python
88
+
import pandas as pd
89
+
import numpy as np
90
+
```
91
+
92
+
## 2. Series and DataFrames
93
+
-**Series**: A one-dimensional array-like object that can hold data of any type (integers, strings, floats, etc.). It has an index for labeling data.
94
+
-**DataFrame**: A two-dimensional, tabular data structure with labeled rows and columns, similar to a spreadsheet or SQL table.
95
+
96
+
```python
97
+
# Creating a Series
98
+
series = pd.Series([10, 20, 30, 40], index=['a', 'b', 'c', 'd'])
99
+
print("Series:\n", series)
100
+
101
+
# Creating a DataFrame
102
+
data = {'Name': ['Alice', 'Bob', 'Charlie'], 'Age': [25, 30, 35]}
103
+
df = pd.DataFrame(data)
104
+
print("\nDataFrame:\n", df)
105
+
```
106
+
107
+
## 3. Creating DataFrames
108
+
DataFrames can be created from dictionaries, lists, or other data structures.
109
+
110
+
```python
111
+
# From a dictionary
112
+
data = {'Product': ['Apple', 'Banana', 'Orange'], 'Price': [1.0, 0.5, 0.75]}
0 commit comments