ipydatagrid
ipydatagrid copied to clipboard
Dictionary Values are Not Displayed correctly
Describe the bug When a Dictionary object is in a column of a Data frame, or even in a list item of a dataframe, it is displayed as [object Object] instead of a more intuitive "use str repr of dictionary".
To Reproduce Steps to reproduce the behavior:
- mydf = pd.DataFrame([{'dict_field':{'hi':'ya'}}, {'dict_field':{'hi':'yo'}}])
- Render this in ipydataframe
- Observe [object Object] rather than {'hi': 'ya'}
- ????
- Profit (Sorry, couldn't help myself)
Expected behavior Like lists, (which are rendered correctly unless they contain dictionaries), ipydatagrid should use a str repr of the dictionary object. I am not sure how that will affect performance, but if performance is a major concern, perhaps make a flag that defaults to False that can override and force that str repr to be displayed
Environment (please complete the following information):
- Jupyter Lab running on Windows in Chrome