擅长:python、mysql、java
<p>试试这个:</p>
<pre><code>pd.set_option('display.expand_frame_repr', False)
</code></pre>
<p>从文档中:</p>
<blockquote>
<p>display.expand_frame_repr : boolean</p>
<p>Whether to print out the full DataFrame repr for wide DataFrames across multiple lines, max_columns is still respected, but the output will wrap-around across multiple “pages” if it’s width exceeds display.width. [default: True] [currently: True]</p>
</blockquote>
<p>见:<a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.set_option.html" rel="noreferrer">http://pandas.pydata.org/pandas-docs/stable/generated/pandas.set_option.html</a></p>