Converting Percentages to CPI Values
Understand how to adjust wage percentage growth data to align with Consumer Price Index values by creating a Python function. Learn the process of converting annual average wage percentages into quarterly CPI approximations to enable accurate comparisons of economic trends.
We'll cover the following...
How to convert data
Well, that’s our formatting problem out of the way: we’ve
converted the CPI data to quarterly increments and cleaned
up the Date format to match the wages data. Now we’ll need to
address the inconsistency between the absolute point values
in the CPI set and the percentages that came with the wages
data.
-
Get that data: First, let’s get that data. Technically, if you’ve been following along on your own, you’ll already have pulled the series back near the beginning, but it can’t hurt to rerun it. (line 5)
-
Save the data: Once again, we save the data to a CSV file (which, again, isn’t necessary). (line 6)
-
Push the data: We push the data to a
dfdata frame and give it column headers. (line 7) ...