title: Function to replace outliers in Python
body: <p>I need to create a FUNCTION to replace outliers in  columns of my dataset with Mean+/- 3* StandardDeviation of that column</p>
  
  <p>For example, The outliers are identified if the value is greater/less than Mean+/- 3* StandardDeviation.</p>
  
  <p>So, If the value in A lets say 285 is an outlier on the upper side it needs to be replaced by Mean+ 3* StandardDeviation. If the outlier is on the lower side it needs to be replaced with Mean - 3* StandardDeviation.</p>
  
  <p>This needs to be done with all columns.</p>
  
  <p>A    B    C</p>
  
  <p>195 106 70</p>
  
  <p>250 121 81</p>
  
  <p>245 127 80</p>
  
  <p>225 150 95</p>
  
  <p>285 130 84</p>
  
  <p>228 180 110</p>
  
  <p>205 138 71</p>