Simple stat functions for data manipulation in python