title: Set value to 90th percentile for each column in a DataFrame
body: <p>I am working with the data which looks like a DataFrame described by</p>
  
  <pre><code>df = pd.DataFrame({'AAA': [1,1,1,2,2,2,3,3], 'BBB': [2,1,3,4,6,1,2,3]})
  </code></pre>
  
  <p>What I would like to do is to set value to roundup (90%) if value exceeds the 90th percentile. So it's like capping the maximum to the 90th percentile. </p>
  
  <p>This is getting trickier for me as every column is going to have different percentile value.</p>
  
  <p>I am able to get 90th percentile value using:</p>
  
  <pre><code>df.describe(percentiles=[.9])
  </code></pre>
  
  <p>So for column BBB, 6 is greater than 4.60 (90th percentile), hence it needs to be changed to 5 (roundup 4.60).</p>
  
  <p>In my actual problem I am doing this for a large matrix, so I would like to know if there is any simple solution to this, rather than creating an array of 90th percentile of columns first and then checking elements in for a column and setting those to roundup to the 90th percentile.</p>