The final reshape

Reshaping Data with pandas

Maria Eugenia Inzaugarat

Data Scientist

 

Congrats message

Reshaping Data with pandas

Chapter 1

 

DataFrame with chapter 1 content

Concept of long and wide formats

Use .pivot() method - columns as unique variables, index as individual observations

Create pivot tables

Learn the difference between .pivot() and .pivot_table()

Reshaping Data with pandas

Chapter 2

 

DataFrame with chapter 2 content

From a wide to a long format using:

  • the .melt() method
  • the wide_to_long() function

Splitting or concatenating string columns

Reshaping Data with pandas

Chapter 3

 

DataFrame with chapter 3 content

Multi-level index

Use .stack() and .unstack()

Handle generated missing data

Reshaping Data with pandas

Chapter 4

 

DataFrame with chapter 4 content

Combine reshaping and grouping processes

List-like column transformation

Nested data in columns

Reshaping Data with pandas

Thank you!

Reshaping Data with pandas

Preparing Video For Download...