Skip to content

Make default astropy.table notebook repr jsview? (or just prettier?) #3937

Closed as not planned

Description

@eteq

This is inspired by a talk at scipy 2015 about the Beaker notebook project. They have some sort of magic that makes Pandas DataFrames look pretty and have tricks like being able to sort in the browser:
http://sharing.beakernotebook.com/gist/anonymous/ee2a39c529e07ae3c2ca

It occurs to me that this is very similar to the existing Table.show_in_browser(jsviewer=True) functionality. Perhaps we should consider trying to make the notebook repr use the jsviewer mode?

Or alternatively, perhaps we should just inject some CSS to make the notebook-generated tables look a bit prettier?

cc @taldcroft

Activity

  1. added this to the v1.1.0 milestone on Jul 10, 2015
  2. removed this from the v1.1.0 milestone on Jul 13, 2015
  3. embray commented on Jul 13, 2015

    @embray
    Member

    Let's not assign milestones unless there's something more concrete...

  4. embray commented on Jul 13, 2015

    @embray
    Member

    That looks nice though--there's been a lot of progress, it seems, on being able to use interactive widgets to repr objects in the notebook, and something like this should be doable.

  5. taldcroft commented on Jul 13, 2015

    @taldcroft
    Member

    @embray - that's sounds intriguing. A slider that scrolled through the table could be good. Do you know of any specific projects or code that we might peek at to get a running start?

  6. eteq commented on Jul 14, 2015

    @eteq
    MemberAuthor

    👍 to the idea of something widgety as a way to make this even nicer.

    For a project that has some pretty in-depth widgets you might want to check out https://github.com/mwcraig/reducer (possibly watch his talk at scipy to see examples of the widgets in action).

  7. embray commented on Aug 17, 2015

    @embray
    Member

    Now that I look, in the original work on the jsviewer @keflavich did try to make it work in IPython Notebook. However, in 934f830 the ability to actually invoke the IPyNB support through the Table.show_in_browser API was quietly revoked. I don't know if this was intentional on @keflavich's part, or just because it never quite worked or what. So the existing code is essentially dead code. Furthermore, it predates even IPython 2.0 and the widget interface. So we should get IPython/Jupyter support going again, but in the form of a widget.

  8. keflavich commented on Aug 17, 2015

    @keflavich
    Contributor

    @embray I can't say why I removed the if ipynb part of this... I think it might have just gotten lost in a refactor, and I don't really use notebooks much so I never noticed. I think using more modern ipython tricks is a good idea.

  9. pllim commented on Feb 14, 2024

    @pllim
    Member

    Given #15905 , this is no longer relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions