Open hshiravi opened 3 years ago
Trying to set a custom formatter when defining a column as specified here throws an error:
def customFormatter(row, cell, value, columnDef, dataContext): return value col_def = { 'A':{ 'width': 50, 'formatter': customFormatter } } df = pd.DataFrame(np.random.random([5, 4]), columns =["A", "B", "C", "D"]) qgrid_widget = qgrid.show_grid(df, column_definitions=col_def)
This throws the following error: ValueError: Can't clean for JSON: <function customFormatter at 0x7f2cd4b5ec10>
ValueError: Can't clean for JSON: <function customFormatter at 0x7f2cd4b5ec10>
How is one expected to set a custom formatter for a column?
Trying to set a custom formatter when defining a column as specified here throws an error:
This throws the following error:
ValueError: Can't clean for JSON: <function customFormatter at 0x7f2cd4b5ec10>
How is one expected to set a custom formatter for a column?