title
Python Pandas Tutorial (Part 3): Indexes - How to Set, Reset, and Use Indexes
description
In this video, we will be learning about the Pandas indexes.
This video is sponsored by Brilliant. Go to https://brilliant.org/cms to sign up for free. Be one of the first 200 people to sign up with this link and get 20% off your premium subscription.
In this Python Programming video, we will be learning about the Pandas index. Indexes allow us to label our rows so that we can access them more easily. We'll learn how to set, reset, and use indexes properly. Let's get started...
The code for this video can be found at:
http://bit.ly/Pandas-03
StackOverflow Survey Download Page - http://bit.ly/SO-Survey-Download
✅ Support My Channel Through Patreon:
https://www.patreon.com/coreyms
✅ Become a Channel Member:
https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join
✅ One-Time Contribution Through PayPal:
https://goo.gl/649HFY
✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot
✅ Corey's Public Amazon Wishlist
http://a.co/inIyro1
✅ Equipment I Use and Books I Recommend:
https://www.amazon.com/shop/coreyschafer
▶️ You Can Find Me On:
My Website - http://coreyms.com/
My Second Channel - https://www.youtube.com/c/coreymschafer
Facebook - https://www.facebook.com/CoreyMSchafer
Twitter - https://twitter.com/CoreyMSchafer
Instagram - https://www.instagram.com/coreymschafer/
#Python #Pandas
detail
{'title': 'Python Pandas Tutorial (Part 3): Indexes - How to Set, Reset, and Use Indexes', 'heatmap': [{'end': 189.948, 'start': 136.805, 'weight': 0.746}, {'end': 223.509, 'start': 198.135, 'weight': 0.728}, {'end': 558.633, 'start': 522.823, 'weight': 1}, {'end': 666.329, 'start': 633.852, 'weight': 0.897}], 'summary': "In the video tutorial 'python pandas tutorial (part 3): indexes - how to set, reset, and use indexes', viewers learn about setting custom indexes and their benefits, using indexes in pandas for efficient data lookup, accessing specific rows and columns by labels, and the importance of unique identifiers for rows, with practical examples from small and larger data sets. the tutorial also includes insights into setting the email address as the index in a pandas dataframe using the set_index method and the option to reset the index if needed. additionally, it mentions the sponsor brilliant.org and previews the next topic on filtering data frames.", 'chapters': [{'end': 34.682, 'segs': [{'end': 34.682, 'src': 'embed', 'start': 0.169, 'weight': 0, 'content': [{'end': 0.809, 'text': "hey there, how's it going?", 'start': 0.169, 'duration': 0.64}, {'end': 4.571, 'text': "everybody in this video we're going to be learning more about indexes.", 'start': 0.809, 'duration': 3.762}, {'end': 13.355, 'text': "so we've seen basic default indexes in previous videos, but in this video we'll learn how to set custom indexes and the benefits of doing this now.", 'start': 4.571, 'duration': 8.784}, {'end': 18.157, 'text': "i'd also like to mention that we do have a sponsor for this series of videos, and that is brilliant.org.", 'start': 13.355, 'duration': 4.802}, {'end': 25.32, 'text': 'so i really want to thank brilliant for sponsoring this series and it would be great if you all could check them out using the link in the description section below and support the sponsors,', 'start': 18.157, 'duration': 7.163}, {'end': 27.8, 'text': "And I'll talk more about their services in just a bit.", 'start': 25.7, 'duration': 2.1}, {'end': 29.981, 'text': "So with that said, let's go ahead and get started.", 'start': 28.18, 'duration': 1.801}, {'end': 34.682, 'text': 'Okay, so I have my snippets file open here or my snippets notebook open here,', 'start': 30.601, 'duration': 4.081}], 'summary': 'Learning about setting custom indexes and benefits, sponsored by brilliant.org.', 'duration': 34.513, 'max_score': 0.169, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/W9XjRYFkkyw/pics/W9XjRYFkkyw169.jpg'}], 'start': 0.169, 'title': 'Learning about indexes', 'summary': 'Focuses on setting custom indexes and the benefits, with a mention of a sponsor, brilliant.org.', 'chapters': [{'end': 34.682, 'start': 0.169, 'title': 'Learning about indexes', 'summary': 'Focuses on learning about setting custom indexes and the benefits, with a mention of a sponsor for the series, brilliant.org.', 'duration': 34.513, 'highlights': ['The video will cover setting custom indexes and their benefits.', 'Mention of brilliant.org as a sponsor for the series.']}], 'duration': 34.513, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/W9XjRYFkkyw/pics/W9XjRYFkkyw169.jpg', 'highlights': ['The video will cover setting custom indexes and their benefits.', 'Mention of brilliant.org as a sponsor for the series.']}, {'end': 381.048, 'segs': [{'end': 103.679, 'src': 'embed', 'start': 54.585, 'weight': 4, 'content': [{'end': 59.189, 'text': 'And I have this data frame displayed down here at the bottom right here.', 'start': 54.585, 'duration': 4.604}, {'end': 67.675, 'text': 'So like I said in previous videos, our data frames have this thing on the far left over here that looks like a column without a name.', 'start': 59.669, 'duration': 8.006}, {'end': 69.837, 'text': 'And this is an index.', 'start': 68.155, 'duration': 1.682}, {'end': 80.405, 'text': "So since we've just seen these default indexes so far, this is currently just a range of numbers that's basically an integer identifier for the rows.", 'start': 70.357, 'duration': 10.048}, {'end': 83.587, 'text': 'So this is a 0, a 1, and a 2.', 'start': 80.985, 'duration': 2.602}, {'end': 91.712, 'text': 'Now, sometimes it might make more sense to have a different identifier for each row, and that will basically be the label for that row,', 'start': 83.587, 'duration': 8.125}, {'end': 92.973, 'text': "so it's usually unique.", 'start': 91.712, 'duration': 1.261}, {'end': 100.437, 'text': "Now pandas doesn't actually enforce indexes being unique, and sometimes it won't be, but most of the time these will be unique values.", 'start': 93.393, 'duration': 7.044}, {'end': 103.679, 'text': 'So what might be a better index for our sample data here?', 'start': 100.877, 'duration': 2.802}], 'summary': 'Introduction to pandas data frame indexes and unique identifiers.', 'duration': 49.094, 'max_score': 54.585, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/W9XjRYFkkyw/pics/W9XjRYFkkyw54585.jpg'}, {'end': 197.675, 'src': 'heatmap', 'start': 126.076, 'weight': 1, 'content': [{'end': 130.72, 'text': 'now, what if we wanted to set these email addresses as the index for this data frame?', 'start': 126.076, 'duration': 4.644}, {'end': 136.084, 'text': 'Well, to do that, we could just say DF dot set underscore index.', 'start': 131.28, 'duration': 4.804}, {'end': 141.229, 'text': 'And then we can just pass in the name of the column that we want for the index.', 'start': 136.805, 'duration': 4.424}, {'end': 146.854, 'text': "So if I run this, then now we can see that the email is on the far left and it's bold.", 'start': 141.67, 'duration': 5.184}, {'end': 152.62, 'text': 'And it actually does kind of look like a normal column because this index has a name.', 'start': 147.315, 'duration': 5.305}, {'end': 155.803, 'text': 'It has the same name as our column when we set it.', 'start': 153.02, 'duration': 2.783}, {'end': 157.804, 'text': 'So I want to show you something here.', 'start': 156.343, 'duration': 1.461}, {'end': 161.266, 'text': 'We can just set this index in this cell.', 'start': 158.204, 'duration': 3.062}, {'end': 169.012, 'text': 'But if I look at my data frame again, so underneath here, if I say DF to print out this data frame,', 'start': 162.107, 'duration': 6.905}, {'end': 171.594, 'text': "then we can see that our data frame didn't actually change.", 'start': 169.012, 'duration': 2.582}, {'end': 175.136, 'text': 'It still has the default index over here on the left.', 'start': 172.154, 'duration': 2.982}, {'end': 179.219, 'text': "And that's because Pandas doesn't do a lot of these changes.", 'start': 175.696, 'duration': 3.523}, {'end': 182.642, 'text': 'in place unless we specifically tell it to do so.', 'start': 179.979, 'duration': 2.663}, {'end': 189.948, 'text': 'And this is actually nice because it allows us to experiment without worrying about modifying our data frame in unexpected ways.', 'start': 183.202, 'duration': 6.746}, {'end': 197.675, 'text': "So let's say that we actually did want to set our index to the email column and have those changes carry over into these future cells.", 'start': 190.689, 'duration': 6.986}], 'summary': 'Setting email addresses as index in data frame using pandas.', 'duration': 71.599, 'max_score': 126.076, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/W9XjRYFkkyw/pics/W9XjRYFkkyw126076.jpg'}, {'end': 223.509, 'src': 'heatmap', 'start': 198.135, 'weight': 0.728, 'content': [{'end': 206.883, 'text': 'So to do this, back up here where we said set index, we can just add in another argument here and say in place is equal to true.', 'start': 198.135, 'duration': 8.748}, {'end': 219.828, 'text': 'Now, if I run that and then rerun the data frame again, then now we can see that it actually did set that index and modified that data frame.', 'start': 207.483, 'duration': 12.345}, {'end': 223.509, 'text': 'And we can actually look specifically at that index.', 'start': 220.248, 'duration': 3.261}], 'summary': 'Setting index in dataframe in place, modified data frame.', 'duration': 25.374, 'max_score': 198.135, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/W9XjRYFkkyw/pics/W9XjRYFkkyw198135.jpg'}, {'end': 267.871, 'src': 'embed', 'start': 235.942, 'weight': 0, 'content': [{'end': 239.066, 'text': 'and it also tells us that the name is equal to email.', 'start': 235.942, 'duration': 3.124}, {'end': 241.449, 'text': 'okay, so why would this actually be useful?', 'start': 239.066, 'duration': 2.383}, {'end': 249.095, 'text': 'Well, like I said before, the email address as the index gives us a nice unique identifier for our row.', 'start': 241.949, 'duration': 7.146}, {'end': 255.621, 'text': 'And remember in the previous video that we used dot loc to search our data frame by label.', 'start': 249.556, 'duration': 6.065}, {'end': 258.923, 'text': 'Well, these indexes are the labels for these rows.', 'start': 256.06, 'duration': 2.863}, {'end': 262.527, 'text': 'So before we just use the default ranged index.', 'start': 259.324, 'duration': 3.203}, {'end': 267.871, 'text': 'But now we can find a specific row by passing in that label.', 'start': 263.027, 'duration': 4.844}], 'summary': 'Using email as index provides unique identifier for rows, improving data search.', 'duration': 31.929, 'max_score': 235.942, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/W9XjRYFkkyw/pics/W9XjRYFkkyw235942.jpg'}, {'end': 381.048, 'src': 'embed', 'start': 332.913, 'weight': 2, 'content': [{'end': 342.661, 'text': 'if you want to use integer location instead of labels, then you still have the iloc indexer available to you, and we saw that last video as well.', 'start': 332.913, 'duration': 9.748}, {'end': 349.367, 'text': "so if I change this to be iloc instead of loc, then it'll still give us that first row, so that still works.", 'start': 342.661, 'duration': 6.706}, {'end': 355.593, 'text': 'now. if you accidentally set the index and want to reset it, then we can do that with the reset index method.', 'start': 349.367, 'duration': 6.226}, {'end': 366.94, 'text': 'so down here I will just say df dot, reset underscore index and I will do an in place equal to true, so that those changes carry over,', 'start': 355.593, 'duration': 11.347}, {'end': 368.661, 'text': "and then I'll go ahead and print out that data frame.", 'start': 366.94, 'duration': 1.721}, {'end': 376.045, 'text': "So if I run this then we can see that now we're back to having that email as a column and the default range index.", 'start': 368.821, 'duration': 7.224}, {'end': 381.048, 'text': "Now, if you actually know what you want the index to be when you're creating your data frame,", 'start': 376.606, 'duration': 4.442}], 'summary': 'Using iloc instead of loc for integer location, resetting index using reset_index method.', 'duration': 48.135, 'max_score': 332.913, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/W9XjRYFkkyw/pics/W9XjRYFkkyw332913.jpg'}], 'start': 34.682, 'title': 'Using indexes in pandas', 'summary': 'Discusses using indexes in pandas, including default and custom indexes, and the need for unique identifiers for rows, with practical examples from small and larger data sets. additionally, it explains setting the email address as the index in a pandas dataframe using the set_index method, highlighting its advantages and providing insights into accessing specific rows and columns by labels, with the option to reset the index if needed.', 'chapters': [{'end': 103.679, 'start': 34.682, 'title': 'Using indexes in pandas', 'summary': 'Discusses how to use indexes in pandas, including default and custom indexes, and the need for unique identifiers for rows, with a small data frame and a larger survey data set.', 'duration': 68.997, 'highlights': ['Indexes in pandas are used to identify rows in a data frame, with default indexes represented as a range of numbers, and the possibility of using unique identifiers as custom indexes.', 'Pandas does not enforce indexes to be unique, but it is usually preferable to have unique values as indexes for rows.', 'Demonstrates using a small data frame to show the default indexes and the potential for unique identifiers as custom indexes.']}, {'end': 381.048, 'start': 104.159, 'title': 'Setting email address as index in pandas dataframe', 'summary': 'Explains how to set the email address as the index in a pandas dataframe using the set_index method, highlighting the advantages of using a unique identifier for rows and accessing specific rows and columns by labels, with the option to reset the index if needed.', 'duration': 276.889, 'highlights': ['The email address serves as a unique identifier for rows, enabling easy access to specific rows and columns by labels using df.loc, enhancing data retrieval efficiency.', 'Using the set_index method with inplace=True modifies the dataframe to have the email as the index, allowing for direct access to the modified dataframe and its index values, which can be accessed using df.index.', 'Pandas allows the use of iloc indexer for integer-based location access if the index has been changed from the default integer index, providing flexibility in accessing dataframe rows based on different index types.', 'The reset_index method can be used to revert the changes made to the index, providing a way to reset the index back to the default range index if needed, offering flexibility in managing the dataframe index.']}], 'duration': 346.366, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/W9XjRYFkkyw/pics/W9XjRYFkkyw34682.jpg', 'highlights': ['The email address serves as a unique identifier for rows, enabling easy access to specific rows and columns by labels using df.loc, enhancing data retrieval efficiency.', 'Using the set_index method with inplace=True modifies the dataframe to have the email as the index, allowing for direct access to the modified dataframe and its index values, which can be accessed using df.index.', 'Pandas allows the use of iloc indexer for integer-based location access if the index has been changed from the default integer index, providing flexibility in accessing dataframe rows based on different index types.', 'The reset_index method can be used to revert the changes made to the index, providing a way to reset the index back to the default range index if needed, offering flexibility in managing the dataframe index.', 'Indexes in pandas are used to identify rows in a data frame, with default indexes represented as a range of numbers, and the possibility of using unique identifiers as custom indexes.', 'Pandas does not enforce indexes to be unique, but it is usually preferable to have unique values as indexes for rows.', 'Demonstrates using a small data frame to show the default indexes and the potential for unique identifiers as custom indexes.']}, {'end': 1033.845, 'segs': [{'end': 522.804, 'src': 'embed', 'start': 495.522, 'weight': 0, 'content': [{'end': 502.85, 'text': "Or we can do this while we're actually reading in the data by passing in an additional argument to the read CSV method.", 'start': 495.522, 'duration': 7.328}, {'end': 509.538, 'text': "So up here where we loaded in the data, let's just add another argument here.", 'start': 503.271, 'duration': 6.267}, {'end': 514.52, 'text': 'And we will call this index underscore call is equal to.', 'start': 510.198, 'duration': 4.322}, {'end': 519.283, 'text': 'And now the name of the column that we want to be the index.', 'start': 515, 'duration': 4.283}, {'end': 522.804, 'text': 'And in this case, I want it to be this respondent unique ID here.', 'start': 519.323, 'duration': 3.481}], 'summary': 'Pass additional argument to read csv method to specify index column.', 'duration': 27.282, 'max_score': 495.522, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/W9XjRYFkkyw/pics/W9XjRYFkkyw495522.jpg'}, {'end': 558.633, 'src': 'heatmap', 'start': 522.823, 'weight': 1, 'content': [{'end': 526.106, 'text': "So I'm going to say our index call is equal to respondent.", 'start': 522.823, 'duration': 3.283}, {'end': 528.107, 'text': 'I will rerun that cell.', 'start': 526.606, 'duration': 1.501}, {'end': 532.651, 'text': "Now I'll come back down here and rerun our data frame head.", 'start': 528.767, 'duration': 3.884}, {'end': 538.736, 'text': 'And now we can see that this is cleaned up a bit because now we have this respondent as our actual index.', 'start': 533.091, 'duration': 5.645}, {'end': 540.958, 'text': 'So now these are the labels.', 'start': 539.357, 'duration': 1.601}, {'end': 549.886, 'text': 'So if you wanted the first respondent, then we could just say df.loc and that is one.', 'start': 541.679, 'duration': 8.207}, {'end': 552.108, 'text': 'So this is the first respondent there.', 'start': 550.106, 'duration': 2.002}, {'end': 554.39, 'text': 'Okay, let me delete that cell.', 'start': 552.428, 'duration': 1.962}, {'end': 558.633, 'text': 'Okay, so now let me show you a real world example of where I would use this.', 'start': 554.99, 'duration': 3.643}], 'summary': 'The transcript demonstrates using respondent as the index and accessing data based on the index labels.', 'duration': 35.81, 'max_score': 522.823, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/W9XjRYFkkyw/pics/W9XjRYFkkyw522823.jpg'}, {'end': 679.712, 'src': 'heatmap', 'start': 633.852, 'weight': 1, 'content': [{'end': 639.419, 'text': 'and then up here I will say that I want the index to be equal to this column.', 'start': 633.852, 'duration': 5.567}, {'end': 643.841, 'text': 'Actually, let me get that within the string there.', 'start': 641.36, 'duration': 2.481}, {'end': 646.682, 'text': 'Okay Index call is equal to column.', 'start': 644.001, 'duration': 2.681}, {'end': 647.802, 'text': 'Run that.', 'start': 647.302, 'duration': 0.5}, {'end': 650.803, 'text': "And now let's rerun our schema data frame.", 'start': 648.042, 'duration': 2.761}, {'end': 653.504, 'text': 'And now we can see that that column is bold.', 'start': 651.283, 'duration': 2.221}, {'end': 654.965, 'text': 'So that is our index.', 'start': 653.644, 'duration': 1.321}, {'end': 659.186, 'text': 'So now we can use dot loc to search for those columns directly.', 'start': 655.425, 'duration': 3.761}, {'end': 666.329, 'text': 'So if I wanted to see what the information for the hobbyist column was, then I could just say, let me scroll down here.', 'start': 659.646, 'duration': 6.683}, {'end': 675.491, 'text': 'I could say schema, data, frame, dot, loc, and then we can just pass in the label of the index that we want.', 'start': 666.769, 'duration': 8.722}, {'end': 679.712, 'text': 'so if I wanted to see what hobbyist was, then we can see all.', 'start': 675.491, 'duration': 4.221}], 'summary': 'Using dot loc to search columns directly in schema data frame.', 'duration': 45.86, 'max_score': 633.852, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/W9XjRYFkkyw/pics/W9XjRYFkkyw633852.jpg'}, {'end': 809.734, 'src': 'embed', 'start': 781.727, 'weight': 3, 'content': [{'end': 785.648, 'text': 'So we can see that we were able to set our indexes and all of that looks good.', 'start': 781.727, 'duration': 3.921}, {'end': 792.71, 'text': 'But it might make it a bit easier to read this schema data frame if the indexes were sorted alphabetically.', 'start': 786.308, 'duration': 6.402}, {'end': 802.112, 'text': "So to do that, it's just as easy as saying schema df dot sort underscore index.", 'start': 793.39, 'duration': 8.722}, {'end': 803.832, 'text': "And let's run this.", 'start': 802.712, 'duration': 1.12}, {'end': 805.353, 'text': 'Let me scroll down here a little bit.', 'start': 804.173, 'duration': 1.18}, {'end': 809.734, 'text': 'And we can see that now these indexes are sorted alphabetically.', 'start': 805.813, 'duration': 3.921}], 'summary': 'Indexes were sorted alphabetically to improve readability of the schema data frame.', 'duration': 28.007, 'max_score': 781.727, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/W9XjRYFkkyw/pics/W9XjRYFkkyw781727.jpg'}, {'end': 912.978, 'src': 'embed', 'start': 881.477, 'weight': 4, 'content': [{'end': 884.779, 'text': 'then now our schema data frame is permanently sorted.', 'start': 881.477, 'duration': 3.302}, {'end': 892.965, 'text': 'So depending on your data, learning about these indexes will be really useful, especially whenever using .', 'start': 885.2, 'duration': 7.765}, {'end': 901.391, 'text': 'loc because it allows you to search by label there, which is extremely useful depending on what type of data you are searching through.', 'start': 892.965, 'duration': 8.426}, {'end': 907.215, 'text': "Okay, so before we end here, I'd like to mention the sponsor of this video, and that is Brilliant.org.", 'start': 901.871, 'duration': 5.344}, {'end': 912.978, 'text': "So in this series, we've been learning about pandas and how to analyze data in python,", 'start': 908.476, 'duration': 4.502}], 'summary': 'Permanently sort schema data frame, use indexes for efficient label-based searches in python with pandas.', 'duration': 31.501, 'max_score': 881.477, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/W9XjRYFkkyw/pics/W9XjRYFkkyw881477.jpg'}, {'end': 962.118, 'src': 'embed', 'start': 935.666, 'weight': 6, 'content': [{'end': 942.369, 'text': "where you'll learn about the techniques being used that allow machines to make decisions where there's just too many variables for a human to consider.", 'start': 935.666, 'duration': 6.703}, {'end': 949.392, 'text': 'So to support my channel and learn more about Brilliant, you can go to brilliant.org forward slash CMS to sign up for free.', 'start': 942.909, 'duration': 6.483}, {'end': 955.135, 'text': 'And also the first 200 people that go to that link will get 20% off the annual premium subscription.', 'start': 949.833, 'duration': 5.302}, {'end': 957.916, 'text': 'And you can find that link in the description section below.', 'start': 955.535, 'duration': 2.381}, {'end': 962.118, 'text': "Again, that's brilliant.org forward slash CMS.", 'start': 958.477, 'duration': 3.641}], 'summary': 'Learn about techniques for machine decision-making. sign up on brilliant.org/cms for free with 20% off premium subscription for first 200 people.', 'duration': 26.452, 'max_score': 935.666, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/W9XjRYFkkyw/pics/W9XjRYFkkyw935666.jpg'}, {'end': 1003.431, 'src': 'embed', 'start': 977.591, 'weight': 5, 'content': [{'end': 985.798, 'text': 'so, for example, in this video, setting the schema data frame index made it very simple for us to look up column names easily.', 'start': 977.591, 'duration': 8.207}, {'end': 992.143, 'text': "so in the next video we're going to start learning how to filter data frames and grab data that meets specific criteria.", 'start': 985.798, 'duration': 6.345}, {'end': 997.867, 'text': 'So maybe we only want to see data where the salary is above a certain amount,', 'start': 992.563, 'duration': 5.304}, {'end': 1003.431, 'text': 'or maybe we only want to see data for people who said that they use Python in this survey.', 'start': 997.867, 'duration': 5.564}], 'summary': 'Learn to filter data frames easily, e.g., by salary or python usage.', 'duration': 25.84, 'max_score': 977.591, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/W9XjRYFkkyw/pics/W9XjRYFkkyw977591.jpg'}], 'start': 381.048, 'title': 'Using indexes in pandas', 'summary': 'Discusses the importance of using indexes in pandas for easy data lookup and efficient data searching, including setting indexes, sorting indexes, and using indexes with .loc. it also mentions the sponsor brilliant.org and previews the next topic on filtering data frames.', 'chapters': [{'end': 702.701, 'start': 381.048, 'title': 'Using indexes in pandas', 'summary': 'Discusses the importance of using indexes in pandas, demonstrating how to set indexes while loading data, and showcasing real-world examples of using indexes to locate specific columns and their meanings.', 'duration': 321.653, 'highlights': ['Demonstrates setting index while loading data by passing an additional argument to the read CSV method, using a real-world example of setting the respondent unique ID as the index, resulting in a cleaned-up data frame with unique labels.', 'Illustrates using dot loc indexer to locate specific columns directly, showcasing how setting the column name as the index enables easy access to column information without manual search.', 'Shows how to use dot loc to find specific column information, such as the question text corresponding to a column, simplifying the process of understanding column meanings in the data.']}, {'end': 1033.845, 'start': 703.101, 'title': 'Using indexes in pandas', 'summary': 'Discusses the use of indexes in pandas, including setting indexes for easy data lookup, sorting indexes alphabetically or in descending order, and the importance of using indexes with .loc for efficient data searching. it also mentions the sponsor brilliant.org and previews the next topic on filtering data frames.', 'duration': 330.744, 'highlights': ["The chapter demonstrates setting indexes for efficient data lookup, such as accessing a specific question text by passing the column name into .loc, allowing easy access to the full question text for 'MGR idiot means' which is 'how confident are you that your manager knows what they're doing', showcasing the usefulness of setting indexes.", "It explains the process of sorting indexes alphabetically using 'schema_df.sort_index()', making it easier to find specific data, and how to sort in descending order by setting 'ascending=False', providing easier readability and access to data, depending on the data needs.", 'The chapter introduces the importance of using indexes with .loc for efficient data searching, highlighting the usefulness of searching by label, and mentions the upcoming topic on filtering data frames based on specific criteria, providing a preview of the next learning topic.', 'The sponsor of the video, Brilliant.org, is mentioned, recommending their statistics course for data analysis fundamentals and machine learning course, with an offer of 20% off the annual premium subscription for the first 200 sign-ups via the provided link, offering a way to supplement learning about data analysis.', 'The chapter emphasizes the importance of using indexes for efficient data lookup, showcasing an example where setting the schema data frame index made it simple to look up column names easily, and previews the next topic on filtering data frames based on specific criteria.']}], 'duration': 652.797, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/W9XjRYFkkyw/pics/W9XjRYFkkyw381048.jpg', 'highlights': ['Demonstrates setting index while loading data by passing an additional argument to the read CSV method, resulting in a cleaned-up data frame with unique labels', 'Illustrates using dot loc indexer to locate specific columns directly, enabling easy access to column information without manual search', 'Shows how to use dot loc to find specific column information, simplifying the process of understanding column meanings in the data', "Explains the process of sorting indexes alphabetically using 'schema_df.sort_index()', making it easier to find specific data", 'Introduces the importance of using indexes with .loc for efficient data searching and mentions the upcoming topic on filtering data frames based on specific criteria', 'Emphasizes the importance of using indexes for efficient data lookup, showcasing an example where setting the schema data frame index made it simple to look up column names easily', 'Mentions the sponsor Brilliant.org, recommending their statistics course for data analysis fundamentals and machine learning course, with an offer of 20% off the annual premium subscription for the first 200 sign-ups via the provided link']}], 'highlights': ['Using the set_index method with inplace=True modifies the dataframe to have the email as the index, allowing for direct access to the modified dataframe and its index values, which can be accessed using df.index.', 'Demonstrates setting index while loading data by passing an additional argument to the read CSV method, resulting in a cleaned-up data frame with unique labels', 'Illustrates using dot loc indexer to locate specific columns directly, enabling easy access to column information without manual search', "Explains the process of sorting indexes alphabetically using 'schema_df.sort_index()', making it easier to find specific data", 'The video will cover setting custom indexes and their benefits.', 'Mention of brilliant.org as a sponsor for the series.', 'Introduces the importance of using indexes with .loc for efficient data searching and mentions the upcoming topic on filtering data frames based on specific criteria']}