From the course: Data Analysis with Python and Pandas

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Challenge: Resampling

Challenge: Resampling

- All right, new message in from Rachel Revenue. Subject line is Monthly and Annual Charts. She writes us, "Hey again, really quick, can you also get me charts of the average oil price by month and year? It'll help me answer deeper questions on trends in this data, thank you." And if you take a look at our results preview on the right, we can now see that we have two oil price charts. Both of these look smoother than what we had before. All right, and so we'll be working with our oil series once again. We read this in a few assignments up, but you may need to import this again. And just to recall, if we want to re-sample a series, let's say by year, we just want to call the re-sample method and specify the aggregation of choice. So we'll want to plot the monthly and yearly average oil prices. I'll let you get to it.

Contents