-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
bugSomething isn't workingSomething isn't workingreleasedThis issue/pull request has been released.This issue/pull request has been released.
Description
Repro: run the following in a cell
import pandas as pd
pd.set_option("display.html.table_schema", True)
class Cmd:
def __init__(self, name, params):
self.name = name
self.params = params
def __repr__(self):
return f'Cmd(name={self.name}, params={self.params})'
cell_payload = [
Cmd(name='foo', params={'bar', 'baz'}),
Cmd(name='foo', params={'bar', 'baz'})
]
pd.DataFrame({'param_session': [cell_payload]})Then the following error appears (with a link to this error page, which mentions that the error was Objects are not valid as a React child (found: object with keys {name}). If you meant to render a collection of children, use an array instead.)

For reference, this is how Pandas would normally render the cell, when setting pd.set_option("display.html.table_schema", False)

Finally, here's what the output looks like in the ipynb file when the error occurs
"application/vnd.dataresource+json": {
"schema": {
"fields": [
{
"name": "index",
"type": "integer"
},
{
"name": "param_session",
"type": "string"
}
],
"primaryKey": [
"index"
],
"pandas_version": "0.20.0"
},
"data": [
{
"index": 0,
"param_session": [
{
"name": "foo"
},
{
"name": "foo"
}
]
}
]
}
},
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingreleasedThis issue/pull request has been released.This issue/pull request has been released.