I tried to load and use the KDITransformer inplace of the QuantileTransformer. I get the error that stats has not been found. It seems like the import of the scipy.stats is not working out. You currently import it as import scipy.stats as spst but refer to it as stats.