-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
max_columns == 0 incorrectly wraps around for wide dfs #7180
Comments
so is this a bug wrt to the current doc string? or an API change? |
I personally find this behavior extremely useful when dealing with big dfs, so I would like to bring it back to life. Then the docs are fine again too. Perhaps it would be nice to make this functionality more visible. The final point is an enhancement proposal: Instead of using the I love the idea of setting max_rows=0 and max_columns=0 and just let the frame expand to the terminal size showing as many rows and columns as possible truncating centrally. Right now, one has to micromanage these options depending on the frame (and its column width) to view as much data as possible. Apparently it worked in the notebook too, back when it was introduced... #453 (comment) |
makes sense ideally get in soon a after 0.14.0 release to get some battle testing in |
Sounds good |
I think if we do the bug fix ok maybe leave the enhancement for 0.14.1 |
@jorisvandenbossche Determining truncate vs info from Right now We could just default to info view for now (bug fix). I'm also happy to check out how much work it is to implement the desired behavior for |
@bjonen fix for this? |
I can look into this on the weekend. This might not be an easy one. |
@bjonen fix for this, or for 0.14.1? |
This will have to wait for 0.14.1 |
noted |
@takluyver @y-p Is this an intentional change? From your commit message (takluyver@be80898)
I would guess that for Finally, is there any code that maps line width to number of columns that can be represented? |
To be precise, the change happens here: takluyver@be80898#diff-1e79abbbdd150d4771b91ea60a4e1cc7R450 I'll try to make max_columns adjust to the terminal width when max_columns == 0 and submit a PR. |
@bjonen fix for this? |
I have not had time to look into this so far... |
I made some progress on this for the string representation. The Does anybody know another way to infer the width in the notebook? I think it would be nice to have this feature in the notebook as well. Scrolling is a good default, but a truncated view which fits the screen is usually all I actually need. |
maybe ask on the IPython list |
Here are the responses from the mailing list: http://python.6.x6.nabble.com/Getting-the-size-of-ipython-notebook-cell-td5063264.html#a5063344 So we can only have this automatic behavior in the terminal. |
closes by #7691 |
According to the description of
max_columns
, should switch to "smaller" (at the beginning to info, nowadays to truncate) view when set to zero instead of wrapping around.Originally introduced here #453 (comment)
Fixed after broken here: #2881
Behavior change (broken again) here #5550
The text was updated successfully, but these errors were encountered: