Statistical Data Transformation Python