python - possible to apply percentile cuts to each column in a dataframe?
<p>Is it possible to put percentile cuts on all columns of a dataframe with using a loop? This is how I am doing it now:</p>

<pre><code>df = pd.DataFrame(np.random.randn(10,5))
df_q = pd.DataFrame()

for i in list(range(len(df.columns))):
    df_q[i] = pd.qcut(df[i], 5, labels=list(range(5)))
</code></pre>

<p>I am hoping there is a slick pandas solution for this to avoid the use of a loop. </p>

<p>Thanks!</p>