def numpymat2df(mat):
    return pd.DataFrame(
        dict(('x%d' % i, mat[:, i]) for i in range(mat.shape[1])))
Sometimes (though not very often) it is useful to convert a numpy matrix
dataset/ETHPy150Open UDST/urbansim/urbansim/utils/misc.py/numpymat2df