port of ruby's descriptive statistics to python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
py_descriptive_statistics
tests
.gitignore
README
setup.py

README

Port of https://github.com/thirtysixthspan/descriptive_statistics to python. 
I've encapsulated it in an Enum class as I wasn't intending to modify the original list.
My main use will be at https://github.com/gleicon/pymetrics package.

Install
    $ python setup install

Basic usage:

    from py_descriptive_statistics import Enum 
    enum = Enum([2,6,9,3,5,1,8,3,6,9,2])
                                                                                    
    print enum.number()                                                             
    print enum.sum()                                                                
    print enum.mean()                                                               
    print enum.median()                                                             
    print enum.variance()                                                           
    print enum.standard_deviation()                                                 
    print enum.percentile(70)                                                       
    print enum.percentile(95)                                                       
    print enum.percentile(99)

To run tests
    $ cd tests
    $ python pdstests.py