Skip to content
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

ENH: raise column number limit for user-completion or add warning #37996

Closed
arw2019 opened this issue Nov 22, 2020 · 2 comments · Fixed by #44335
Closed

ENH: raise column number limit for user-completion or add warning #37996

arw2019 opened this issue Nov 22, 2020 · 2 comments · Fixed by #44335
Labels
Enhancement Output-Formatting __repr__ of pandas objects, to_string
Milestone

Comments

@arw2019
Copy link
Member

arw2019 commented Nov 22, 2020

xref PR #35207

Currently the user-completion (ipython "") on a dataframe with more than 100 columns will silently ignore some columns, letting an unaware user confused on whether data disapeared.

This is actually documented, and due to an arbitrary limit set to workaround a performance issue ( See #18587 )

Dataframe with more than 100 columns are quite common, so this can potentially affect and suprise many users. Therefore, I suggest to increase that limit to, say, 1000. In any case, it would probably be good to warn the user hitting that limit.

The attached quickfix raises the limit to 1000 and adds a warning beyond.

xref #35207 (comment)

This is still an arbitrary limit. adding a warning is maybe a good idea. Maybe this could be a pandas option to allow users to change this if required.

@TheDerivator
Copy link
Contributor

I think I don't have the performance issue but regardless, I would propose to make it optional, and let the value (currently 100) be taken from the options so that

pd.set_option('display.max_dir_items', None)

would remove the cap.

@mzeitlin11
Copy link
Member

Would be +1 on adding an option to give some flexibility here

@mzeitlin11 mzeitlin11 added Needs Discussion Requires discussion from core team before further action and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 15, 2021
@mroeschke mroeschke removed Docs Needs Discussion Requires discussion from core team before further action labels Aug 14, 2021
@jreback jreback added this to the 1.4 milestone Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants