Working with CPI and Salary Data

Learn how to work with the CPI and salary data, import libraries, and access data series, and what problems we need to overcome.

Working with CPI and salary data is quite simple. Firstly, we’ll import libraries, and then we’ll access the data series using CSV files.

Import libraries

With that out of the way, we’re all set to start digging for CPI and employment data. Importing four libraries, including bls will give us the tools we’re going to need.

Now we pass the BLS endpoint for the wages and salaries data series to the bls.get_series command from the bls library. We copied the endpoint from the popular datasets page on the BLS website. We’ll assign the data series that comes back to the variable wages and then look at a sample from the data set.

Get hands-on with 1400+ tech skills courses.