ipydatagrid
ipydatagrid copied to clipboard
datetime and Decimal objects get "Can't clean for JSON" message
Describe the bug Similar to the pd.NA bug #257 datatypes like datetime and Decimal objects produce and error on render. Perhaps we should just to do the str repr?
To Reproduce
import datetime
import ipydatagrid
from decimal import Decimal
import pandas as pd
mydf = pd.DataFrame({"text_col": ['a', 'b', pd.NA, Decimal(0.00), datetime.date(2022, 8, 19)]})
mydg = ipydatagrid.DataGrid(mydf)
**Expected behavior**
Ideally if there is a type of data it doesn't understand, force it to string and show it as such (or at least an option to do that)
Hello @JohnOmernik and welcome to the ipydatagrid community! Thanks for reporting the error - I will get that fixed.