Explore the Jobs dataset
In this exercise, you will explore the new jobs
DataFrame, which contains the unemployment rate of different industries in the USA during the years of 2000-2010. As you will see, the dataset contains time series for 16 industries and across 122 timepoints (one per month for 10 years). In general, the typical workflow of a Data Science project will involve data cleaning and exploration, so we will begin by reading in the data and checking for missing values.
Este ejercicio forma parte del curso
Visualizing Time Series Data in Python
Instrucciones del ejercicio
We've imported pandas
as pd
.
- Read in the the csv file located at
url_jobs
into a DataFrame calledjobs
and review the data type of each column. - Convert the
datestamp
column injobs
to thedatetime
type. - Set the
datestamp
column as the index ofjobs
. - Print the number of missing values in each column of
jobs
.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Read in jobs file
jobs = ____
# Print first five lines of your DataFrame
print(jobs.head(5))
# Check the type of each column in your DataFrame
print(jobs.dtypes)
# Convert datestamp column to a datetime object
jobs[____] = ____(jobs[____])
# Set the datestamp columns as the index of your DataFrame
jobs = ____('datestamp')
# Check the number of missing values in each column
print(jobs.isnull().____())