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

feat: ux: inline way to adjust interactive config #7172

Closed
1 task done
NickCrews opened this issue Sep 18, 2023 · 1 comment · Fixed by #7915
Closed
1 task done

feat: ux: inline way to adjust interactive config #7172

NickCrews opened this issue Sep 18, 2023 · 1 comment · Fixed by #7915
Labels
feature Features or general enhancements
Milestone

Comments

@NickCrews
Copy link
Contributor

NickCrews commented Sep 18, 2023

Is your feature request related to a problem?

I love the interactive defaults of ibis, how it executes the first 10 rows of a table and shows them with rich. Gets me by for 95% of the time.

But sometimes I want to look at say 30 rows. Or I'm looking at long strings or long nested types, and I don't want them cut off, so I want to be able to set max_string and max_length.

Describe the solution you'd like

Something short and quick would be great!

An explicit method? Like Table.preview(max_rows, max_columns, max_string, max_length, show_dtypes, ...). This would just be the existing method __repr__ method, just exposed publicly.

implicitly? like Table.limit(30) just works and actually shows 30 rows? eg if the root Op was a LimitOp, then assume that is what the user wants, and use that instead of the config of 10. This has problems if the limit is like 10k or something and the user didn't actually want to preview the rows. So IDK, if less than 100 then use it, otherwise go back to the config value of 10? In the best case, this has the best UX, but also could lead to surprises. This also does not cover the other usecases (less needed for me, but would be nice) like max_string.

We could do either or both of these

Existing pandas solution

.limit(30).execute(), but that gives me a pandas table which I don't like because

  1. it doesn't show the dtype
  2. it doesn't show all columns (as ibis does, which I love)
  3. ugly line wrapping in some consoles

Existing ibis config solution

set ibis.options.repr.interactive.max_rows = 30, and then unset afterwards.

What version of ibis are you running?

main

What backend(s) are you using, if any?

NA

Code of Conduct

  • I agree to follow this project's Code of Conduct
@NickCrews NickCrews added the feature Features or general enhancements label Sep 18, 2023
@lostmygithubaccount
Copy link
Member

I like the idea of an explicit preview method with per-use control over how the table looks

NickCrews added a commit to NickCrews/ibis that referenced this issue Oct 20, 2023
@lostmygithubaccount lostmygithubaccount moved this from backlog to review in Ibis planning and roadmap Dec 6, 2023
@lostmygithubaccount lostmygithubaccount moved this from review to cooking in Ibis planning and roadmap Jan 30, 2024
@lostmygithubaccount lostmygithubaccount moved this from cooking to done in Ibis planning and roadmap Jan 30, 2024
@lostmygithubaccount lostmygithubaccount moved this from done to review in Ibis planning and roadmap Jan 30, 2024
@gforsyth gforsyth added this to the 9.0 milestone Mar 19, 2024
@cpcloud cpcloud removed this from the 9.0 milestone Apr 1, 2024
NickCrews added a commit that referenced this issue Apr 12, 2024
redo of #7408 targeting main instead of master

fixes #7172
@github-project-automation github-project-automation bot moved this from review to done in Ibis planning and roadmap Apr 12, 2024
@cpcloud cpcloud added this to the 9.0 milestone Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Features or general enhancements
Projects
Archived in project
4 participants