def robust_scale(X, axis=0, with_centering=True, with_scaling=True, quantile_range=(25.0, 75.0), copy=True):
 s = RobustScaler(with_centering=with_centering, with_scaling=with_scaling, quantile_range=quantile_range, copy=copy)
 if (axis == 0):
  return s.fit_transform(X)
 else:
  return s.fit_transform(X.T).T

def robust_scale ( X , axis = 0 , with_centering = True , with_scaling = True , quantile_range = ( 25.0 , 75.0 ) , copy = True ) : s = RobustScaler ( with_centering = with_centering , with_scaling = with_scaling , quantile_range = quantile_range , copy = copy ) if ( axis == 0 ) : return s . fit_transform ( X ) else : return s . fit_transform ( X . T ) . T
standardize a dataset along any axis center to the median and component wise scale according to the interquartile range .