In this video, check your understanding of reshaping.
- [Instructor] We're going to look at two new functions…that are very helpful,…especially when used in conjunction with group by.…The stack function allows you to move the inner columns…to the rows for the dataframe…and the unstack function does the reverse.…The next slide has a helpful visualization…that will help you understand…what both the stack and the unstack functions do.…The stack function helps you to reshape the dataframe.…The table on the top left is the original dataframe.…
What I have captured here are the athletes…that's both the male and female athletes…that won medals at the Beijing 2008 Olympics…in both the 100 meters and the 200 meters athletic events…and which countries they represented.…Let's head over to the Jupyter Notebook…and create this table,…so let's import pandas as pd,…import our dataset into the dataframe.…Let's take a look at the athletes…that took part in the 100 meters…or the 200 meters track event,…so we want to use our dataframe…and remember that there are going to be…a couple of conditions…
- Working with plots
- Boolean indexing
- String handling
- Grouping data
- Creating your own colormaps
Skill Level Intermediate
1. Technical Setup
2. Series and DataFrames
3. Data Input and Validation
4. Basic Analysis
5. Basic Plotting
9. Data Visualizations
Next steps1m 1s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.