Rolling Apply and Mapping Functions - p.15 Data Analysis with Python and Pandas Tutorial
In this data analysis with Python and Pandas tutorial, we cover function mapping and rolling_apply with Pandas.
The idea of function mapping and rolling apply is to allow you to fully customize Pandas to do whatever you need. If there isn't a pre-built method or function for you to run against to your dataframe to do analysis or manipulation, you can use function mapping, creating your own function entirely.
Sample code and text-based version of this tutorial: http://pythonprogramming.net/rolling-apply-mapping-functions-data-analysis-python-pandas-tutorial/
If you need to do something similar to this, but in a rolling fashion with a moving window, then you can do this with rolling_apply. Both will be covered here.
http://pythonprogramming.net
https://twitter.com/sentdex