Pandas DataFrame MultiLevel Index and Column | Optimize Data Processing

Опубликовано: 14 Октябрь 2022
на канале: Roy Jafari
431
6

This video uses a couple of examples to show how the pandas DataFrame index (including multi-level index and columns) can be helpful in optimizing your data processing.

Also, this video features the two following functions to create DataFrame with multi-level index.

pd.MultiIndex.from_product()
pd.MultiIndex.from_arrays()

To access the code and data use this GitHub Repository: https://github.com/royjafari/DataFram...

Chapters
0:00 Video Introduction
1:55 Overview of Sample Data
4:29 Pandas DataFrame Structure
7:23 .loc[] vs .iloc[]
10:37 Example with .loc[]
13:34 Examples with swaplevel()
19:27 Examples with groupby - swaplevel() - stack()/unstack()
23:17 Example of creating multi_level index
32:54 Video summary