How to loop through columns in a Data Frame and cap the values at 97.5th percentile of that column?
Eg. if one particular column has values 1 to 100 filled in it, the value >97.5, i.e 98, 99 and 100 should all be given 97.5.
Please see, I want to do this for columns 4 to last in the data frame.