Practicing Series Filtering with S&P500 and Census Data
Practicing Series Filtering with S&P500 and Census Data Data Science Project
Intro to Pandas for Data Analysis

Practicing Series Filtering with S&P500 and Census Data

In this project we'll practice filtering and selection of Pandas series with two datasets: one containing S&P500 returns and one containing Census Data. Your job will be to create different query expressions to gather insights from the data that's stored in Pandas series.
Start this project
Practicing Series Filtering with S&P500 and Census DataPracticing Series Filtering with S&P500 and Census Data
Project Created by

Santiago Basulto

Project Activities

All our Data Science projects include bite-sized activities to test your knowledge and practice in an environment with constant feedback.

All our activities include solutions with explanations on how they work and why we chose them.

codevalidated

Rename the series accordingly

Rename both series with the names specified below, given their variables:

  • age_marriage: should be named "Age of First Marriage"
  • sp500: should be named "S&P500 Returns 90s"
input

What's the maximum Age of marriage?

What's the maximum value in age_marriage?

input

What's the median Age of Marriage?

Enter a whole number (an integer).

input

What's the minimum return from S&P500?

Enter the value with up 2 decimals of precision. Example, if the value is -11.8718, enter only -11.87.

input

How many Women marry at age 21?

21 is the most common age for marriage (you can check that using the .mode() method). How many women married at that age?

input

How many Women marry at 39y/o or older?

input

How many positive S&P500 returns are there?

That is, a return greater than 0.

input

How many returns are less or equals than -2?

codevalidated

Select all women below 20 or above 39

Perform a selection of all the values in age_marriage that are below 20 or above 39. Store your results in the variable age_20_39.

codevalidated

Select all women whose ages are **even**, and are older than 30 y/o

Perform a selection of all the values that are greater than 30 and even. Store your result in the variable age_30_even.

codevalidated

Select the S&P500 returns between 1.5 and 3

Select all the S&P500 returns that are greater than 1.5 and lower than 3. Store your results in the variable sp_15_to_3.

Practicing Series Filtering with S&P500 and Census DataPracticing Series Filtering with S&P500 and Census Data
Project Created by

Santiago Basulto

This project is part of

Intro to Pandas for Data Analysis

Explore other projects