Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Rolling statistics - p.11 Data Analysis with Python and Pandas Tutorial
Play lesson

Data Analysis with Python and Pandas - Rolling statistics - p.11 Data Analysis with Python and Pandas Tutorial

4.0 (0)
16 learners

What you'll learn

This course includes

  • 3.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

Welcome to another data analysis with Python and Pandas tutorial series, where we become real estate moguls. In this tutorial, we're going to be covering the application of various rolling statistics to our data in our dataframes. One of the more popular rolling statistics is the moving average. This takes a moving window of time, and calculates the average or the mean of that time period as the current value. In our case, we have monthly data. So a 10 moving average would be the current value, plus the previous 9 months of data, averaged, and there we would have a 10 moving average of our monthly data. Doing this is Pandas is incredibly fast. Pandas comes with a few pre-made rolling statistical functions, but also has one called a rolling_apply. This allows us to write our own function that accepts window data and apply any bit of logic we want that is reasonable. This means that even if Pandas doesn't officially have a function to handle what you want, they have you covered and allow you to write exactly what you need. Let's start with a basic moving average, or a rolling_mean as Pandas calls it. You can check out all of the Moving/Rolling statistics from Pandas' documentation. Text tutorial and sample code: http://pythonprogramming.net/rolling-statistics-data-analysis-python-pandas-tutorial/ http://pythonprogramming.net https://twitter.com/sentdex

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere