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

stdout is not correctly rendered in some cases #82

Closed
vanyle opened this issue Dec 2, 2021 · 3 comments · Fixed by #102
Closed

stdout is not correctly rendered in some cases #82

vanyle opened this issue Dec 2, 2021 · 3 comments · Fixed by #102
Assignees
Labels
bug Something isn't working

Comments

@vanyle
Copy link
Contributor

vanyle commented Dec 2, 2021

import pandas as pd

d = {'col1':[1,2],'col2':[3,4]}
df = pd.DataFrame(data=d)

df.describe()

On a jupyter notebook, the code above renders a pretty image:
image

This is not the case currently:
image

@vanyle vanyle added the bug Something isn't working label Dec 2, 2021
@vanyle
Copy link
Contributor Author

vanyle commented Dec 2, 2021

kernel.py needs an update where the case 'text/html' in message['data']: is handled.

@AlexandreSajus AlexandreSajus self-assigned this Dec 2, 2021
@vanyle
Copy link
Contributor Author

vanyle commented Dec 2, 2021

By setting the gui property of the kernel_manager to qt, the output object type can look like parsed qt objects.

When the python is:

from ipywidgets import interact, interactive, fixed, interact_manual
import ipywidgets as widgets

def f(x):
    return x

interact(f, x=10)

Then, the message is:

{
   "data":{
      "state":{
         "_model_module":"@jupyter-widgets/base",
         "_model_module_version":"1.2.0",
         "_model_name":"LayoutModel",
         "_view_count":"None",
         "_view_module":"@jupyter-widgets/base",
         "_view_module_version":"1.2.0",
         "_view_name":"LayoutView",
         "align_content":"None",
         "align_items":"None",
         "align_self":"None",
         "border":"None",
         "bottom":"None",
         "display":"None",
         "flex":"None",
         "flex_flow":"None",
         "grid_area":"None",
         "grid_auto_columns":"None",
         "grid_auto_flow":"None",
         "grid_auto_rows":"None",
         "grid_column":"None",
         "grid_gap":"None",
         "grid_row":"None",
         "grid_template_areas":"None",
         "grid_template_columns":"None",
         "grid_template_rows":"None",
         "height":"None",
         "justify_content":"None",
         "justify_items":"None",
         "left":"None",
         "margin":"None",
         "max_height":"None",
         "max_width":"None",
         "min_height":"None",
         "min_width":"None",
         "object_fit":"None",
         "object_position":"None",
         "order":"None",
         "overflow":"None",
         "overflow_x":"None",
         "overflow_y":"None",
         "padding":"None",
         "right":"None",
         "top":"None",
         "visibility":"None",
         "width":"None"
      },
      "buffer_paths":[
         
      ]
   },
   "comm_id":"b4cd3d090bae463e95dcc46e1d23fdad",
   "target_name":"jupyter.widget",
   "target_module":"None"
}

In this case, it should be parsed to a Qt object and displayed.

@AlexandreSajus
Copy link
Contributor

Okay, I'll fix the pandas example. Treating outputs as qt objects should be an issue/enhancement on its own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants