2020-04-21 16:42:19 +00:00
---
id: 5e9a093a74c4063ca6f7c159
title: Pandas Indexing and Conditional Selection
challengeType: 11
2020-11-27 18:02:05 +00:00
videoId: '-ZOrgV_aA9A'
2021-01-13 02:31:00 +00:00
dashedName: pandas-indexing-and-conditional-selection
2020-04-21 16:42:19 +00:00
---
2020-11-27 18:02:05 +00:00
# --description--
2020-08-04 19:56:41 +00:00
2020-11-27 18:02:05 +00:00
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
2020-09-03 16:48:42 +00:00
2020-07-17 09:12:45 +00:00
More resources:
2020-09-03 16:48:42 +00:00
2020-11-27 18:02:05 +00:00
- [Notebooks on GitHub ](https://github.com/ine-rmotr-curriculum/freecodecamp-intro-to-pandas )
- [How to open Notebooks from GitHub using Google Colab. ](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb )
# --question--
## --text--
What will the following code print out?
```py
import pandas as pd
certificates_earned = pd.Series(
[8, 2, 5, 6],
index=['Tom', 'Kris', 'Ahmad', 'Beau']
)
print(certificates_earned[certificates_earned > 5])
```
## --answers--
2021-01-21 18:12:42 +00:00
< pre >
2020-11-27 18:02:05 +00:00
Tom True
Kris False
Ahmad False
Beau True
dtype: int64
2021-01-21 18:12:42 +00:00
< / pre >
2020-11-27 18:02:05 +00:00
---
2021-01-21 18:12:42 +00:00
< pre >
2020-11-27 18:02:05 +00:00
Tom 8
Ahmad 5
Beau 6
dtype: int64
2021-01-21 18:12:42 +00:00
< / pre >
2020-11-27 18:02:05 +00:00
---
2021-01-21 18:12:42 +00:00
< pre >
2020-11-27 18:02:05 +00:00
Tom 8
Beau 6
dtype: int64
2021-01-21 18:12:42 +00:00
< / pre >
2020-11-27 18:02:05 +00:00
## --video-solution--
3