Pandas_Tutorial
Pandas_Tutorial
---
### Series
A Series is a one-dimensional array-like object that can hold data of
any type (integers, strings, floats, etc.), along with an associated
index. It is similar to a column in a spreadsheet or a dictionary where
keys are the index.
Example:
```python
import pandas as pd
print(series)
```
Output:
```
A 10
B 20
C 30
D 40
dtype: int64
```
### DataFrame
A DataFrame is a two-dimensional, tabular data structure with labeled
rows and columns, akin to a spreadsheet. It is essentially a collection
of Series sharing the same index.
Example:
```python
data = {
'Name': ['Alice', 'Bob', 'Charlie'],
'Age': [25, 30, 35],
'Salary': [50000, 60000, 70000]
}
df = pd.DataFrame(data)
print(df)
```
Output:
```
Name Age Salary
0 Alice 25 50000
1 Bob 30 60000
2 Charlie 35 70000
```
---
## 2. Reading Data
Pandas makes it easy to read and write data in various formats like
CSV, Excel, JSON, SQL, and more.
---
## 3. Data Cleaning
---
## 4. Data Manipulation
---
---
## 6. Grouping Data
### Group By
```python
grouped = df.groupby('Category')
```
---
## 7. Merging Data
---
### Summary
Pandas is a versatile tool that allows efficient handling of structured
data. Whether you're cleaning messy data, performing calculations,
or preparing data for visualization, Pandas is your go-to library in
Python. Each operation-reading, cleaning, manipulating, grouping,
and merging-forms the foundation of data analysis workflows.