Create trans.py

This file acts as a service to transform given data into a form the k-NN algorithm can handle.