Skip to content

Jupyter integration support #245

@xbwwj

Description

@xbwwj

Describe the enhancement requested

Deno has officially supported Jupyter, and jupyter output can be customized by defining a [Symbol.for("Jupyter.display")] method in the class.

For example, the following code displays a dataframe.

{ [Symbol.for("Jupyter.display")]() { return { // HTML output "text/html": `  <table border="1" class="dataframe">  <thead>  <tr>  <th>name</th>  <th>age</th>  </tr>  </thead>  <tbody>  <tr>  <td>Alice</td>  <td>22</td>  </tr>  <tr>  <td>Bob</td>  <td>24</td>  </tr>  </tbody>  </table>`, } }

The output is like:

name age
Alice 22
Bob 24

This can be helpful for interactive data exploration.

Are you interested in having such integration in your project? I can help make a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions