How to print DataFrame on single line : <p>With:</p>

<pre><code>import pandas as pd
df = pd.read_csv('pima-data.csv')
print df.head(2)
</code></pre>

<p>the print is automatically formatted across multiple lines:</p>

<pre><code>   num_preg  glucose_conc  diastolic_bp  thickness  insulin   bmi  diab_pred  \
0         6           148            72         35        0  33.6      0.627   
1         1            85            66         29        0  26.6      0.351   

   age    skin diabetes  
0   50  1.3790     True  
1   31  1.1426    False 
</code></pre>

<p>I wonder if there is a way to avoid the multi-line formatting. I would rather have it printed in a single line like so:</p>

<pre><code>   num_preg  glucose_conc  diastolic_bp  thickness  insulin       bmi      diab_pred     age       skin      diabetes  
0         6           148            72         35        0      33.6          0.627      50     1.3790          True  
1         1            85            66         29        0      26.6          0.351      31     1.1426         False 
</code></pre>
