Affected files: .obsidian/workspace.json 0 Journal/0 Daily/2025-07-21.md Temporary/Pandas.md
20 lines
444 B
Markdown
20 lines
444 B
Markdown
---
|
|
title: Pandas
|
|
created_date: 2025-07-21
|
|
updated_date: 2025-07-21
|
|
aliases:
|
|
tags:
|
|
---
|
|
# Pandas
|
|
|
|
## Stack, Unstack
|
|
Unstack converts a multi index into a column index
|
|
Stack converts a multi column into a multi index
|
|
## Melting and Pivoting
|
|
|
|
They are very specific --> you can do stack and unstack to achieve the same result
|
|
|
|
## get_dummies()
|
|
|
|
You can get categorical data (sex: male / female) into 2 columns: sex_Male (0 / 1), sex_Female (0/ 1)
|