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

Static DataFrame output in notebooks is not uncollapsible #513

Closed
Jolanrensen opened this issue Nov 21, 2023 · 5 comments · Fixed by #519
Closed

Static DataFrame output in notebooks is not uncollapsible #513

Jolanrensen opened this issue Nov 21, 2023 · 5 comments · Fixed by #519
Assignees
Labels
enhancement New feature or request research This requires a deeper dive to gather a better understanding
Milestone

Comments

@Jolanrensen
Copy link
Collaborator

After #480 and #511 we now have static DataFrame outputs in Notebooks. However, as can be seen in this example,
image
, nested DataFrames are not rendered and cannot be interacted with. This is because nested JS and iFrames are prohibited in GitHub's rendering of notebooks.
We need to explore whether there's a way to have collapsible DataFrames without using JS. Maybe something like <details> could work?

For example:

urlnamereposmembers
https://api.github.com/orgs/JetBrainsJetBrains
[100 x 37]
urlnamereposmembers
https://api.github.com/orgs/JetBrainsJetBrains[100 x 37][187 x 7]
[187 x 7]
@Jolanrensen Jolanrensen added enhancement New feature or request research This requires a deeper dive to gather a better understanding labels Nov 21, 2023
@Jolanrensen Jolanrensen added this to the Backlog milestone Nov 21, 2023
@Jolanrensen
Copy link
Collaborator Author

image
Getting there :)

@Jolanrensen
Copy link
Collaborator Author

The ColGroups are more difficult. However, I think we could also reuse part of our normal HTML generator, uncollapse all grouped columns and provide it statically like that.

@Jolanrensen Jolanrensen self-assigned this Nov 22, 2023
@Jolanrensen Jolanrensen modified the milestones: Backlog, 0.13.0 Nov 24, 2023
@Jolanrensen
Copy link
Collaborator Author

Jolanrensen commented Nov 24, 2023

test without CSS for github

nameagecityweightisHappylastName2frameColframeCol2
firstNamelastName
firstNamesecondNamethirdName
AlicenullnullCooper15London54trueCooper
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

DataFrame [7 x 7]
nameagecityweightisHappylastName2frameCol
firstNamelastName
firstNamesecondNamethirdName
AlicenullnullCooper15London54trueCooper
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

BobnullnullDylan45Dubai87trueDylan
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

CharlienullnullDaniels20MoscownullfalseDaniels
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

CharlienullnullChaplin40MilannulltrueChaplin
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

BobnullnullMarley30Tokyo68trueMarley
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

... showing only top 5 of 7 rows

BobnullnullDylan45Dubai87trueDylan
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

DataFrame [7 x 7]
nameagecityweightisHappylastName2frameCol
firstNamelastName
firstNamesecondNamethirdName
AlicenullnullCooper15London54trueCooper
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

BobnullnullDylan45Dubai87trueDylan
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

CharlienullnullDaniels20MoscownullfalseDaniels
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

CharlienullnullChaplin40MilannulltrueChaplin
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

BobnullnullMarley30Tokyo68trueMarley
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

... showing only top 5 of 7 rows

CharlienullnullDaniels20MoscownullfalseDaniels
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

DataFrame [7 x 7]
nameagecityweightisHappylastName2frameCol
firstNamelastName
firstNamesecondNamethirdName
AlicenullnullCooper15London54trueCooper
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

BobnullnullDylan45Dubai87trueDylan
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

CharlienullnullDaniels20MoscownullfalseDaniels
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

CharlienullnullChaplin40MilannulltrueChaplin
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

BobnullnullMarley30Tokyo68trueMarley
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

... showing only top 5 of 7 rows

CharlienullnullChaplin40MilannulltrueChaplin
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

DataFrame [7 x 7]
nameagecityweightisHappylastName2frameCol
firstNamelastName
firstNamesecondNamethirdName
AlicenullnullCooper15London54trueCooper
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

BobnullnullDylan45Dubai87trueDylan
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

CharlienullnullDaniels20MoscownullfalseDaniels
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

CharlienullnullChaplin40MilannulltrueChaplin
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

BobnullnullMarley30Tokyo68trueMarley
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

... showing only top 5 of 7 rows

BobnullnullMarley30Tokyo68trueMarley
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

DataFrame [7 x 7]
nameagecityweightisHappylastName2frameCol
firstNamelastName
firstNamesecondNamethirdName
AlicenullnullCooper15London54trueCooper
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

BobnullnullDylan45Dubai87trueDylan
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

CharlienullnullDaniels20MoscownullfalseDaniels
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

CharlienullnullChaplin40MilannulltrueChaplin
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

BobnullnullMarley30Tokyo68trueMarley
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

... showing only top 5 of 7 rows

AlicenullnullWolf20null55falseWolf
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

DataFrame [7 x 7]
nameagecityweightisHappylastName2frameCol
firstNamelastName
firstNamesecondNamethirdName
AlicenullnullCooper15London54trueCooper
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

BobnullnullDylan45Dubai87trueDylan
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

CharlienullnullDaniels20MoscownullfalseDaniels
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

CharlienullnullChaplin40MilannulltrueChaplin
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

BobnullnullMarley30Tokyo68trueMarley
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

... showing only top 5 of 7 rows

CharlienullnullByrd30Moscow90trueByrd
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

DataFrame [7 x 7]
nameagecityweightisHappylastName2frameCol
firstNamelastName
firstNamesecondNamethirdName
AlicenullnullCooper15London54trueCooper
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

BobnullnullDylan45Dubai87trueDylan
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

CharlienullnullDaniels20MoscownullfalseDaniels
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

CharlienullnullChaplin40MilannulltrueChaplin
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

BobnullnullMarley30Tokyo68trueMarley
DataFrame [7 x 5]
nameagecityweightisHappy
firstNamelastName
AliceCooper15London54true
BobDylan45Dubai87true
CharlieDaniels20Moscownullfalse
CharlieChaplin40Milannulltrue
BobMarley30Tokyo68true

... showing only top 5 of 7 rows

... showing only top 5 of 7 rows

@Jolanrensen
Copy link
Collaborator Author

Jolanrensen commented Nov 27, 2023

image
apparently in notebooks, Github's rendering engine seems to strip out <details> and <summary> tags :/

@Jolanrensen
Copy link
Collaborator Author

image
Github really cannot render anything...

@Jolanrensen Jolanrensen linked a pull request Nov 28, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request research This requires a deeper dive to gather a better understanding
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant