-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
Type: enhancementNew feature or requestNew feature or request
Description
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
Labels
Type: enhancementNew feature or requestNew feature or request