A few suggestions for the python script:

Community Data Science Collective || Want to submit a patch?