-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Can't pd.options.display.max_columns = 0 by default? #16579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Say you auto-detect (via get_terminal_size) and its 80, then what, how many columns should it be? This is a pretty reasonable default. |
Maybe I wasn't clear. If the width gets autodetected, a much more reasonable choice for |
@jreback could you reconsider this? Here's an example to show what I mean:
In a terminal (mine has 100 columns), the default output of this dataframe looks like this:
Now if I set
So I was wondering why |
I usually set the max columns to 0 in my IPython init. I think it would be ok to change the default. Do we still run into issues where we can't reliably detect the terminal width, or have those all been fixed? |
I'll create a PR so that this stays on the radar. I'd also like to propose to change |
Regarding the detection of the terminal width, I think it doesn't work in PyCharm's integrated terminal. However, the default of 80 is a reasonable value in this case. |
pd.options.display.max_columns
is 20 by default, but when running in a terminal this value could be auto-detected by setting it to 0. I know that this setting can be customized, but for the average user it would be much more convenient if there was no extra step involved. Is there a way to detect if pandas is running in a terminal (where autodetection works)? If so, the value should be set to 0. Otherwise, for example in Jupyter notebooks, it could remain to be 20.The text was updated successfully, but these errors were encountered: