Join Jonathan Fernandes for an in-depth discussion in this video Using set_index(), part of pandas Essential Training.
- [Narrator] The set index allows us…to determine which of the series is going to be the index.…We will use the set index…with one key parameter, which is the keys.…We will look at inplace in particular,…in the next Jupyter notebook.…Now remember that I said, one of the advantages of Pandas…is that you can use labels as an index.…So let's set the athlete series as our index.…Now, what I'm going to do is…I'm going to show you two ways of going about this.…So let's look at our original data frame, which is oo.head.…
And we can see that currently,…the index is this first column.…And this data frame is indexed by these numbers.…Now, if I want to set the athlete as the index,…one way of doing this is to use the oo.set index…and I specify that I want this data frame…indexed by athlete.…And you can see, that the athlete is now in bold,…and this first column is your index.…
Now, let's confirm that the athlete is in fact our index.…So I'm going to do another…head on my original data frame,…and surprisingly, we find that the data frame…
- 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.