ipydatagrid icon indicating copy to clipboard operation
ipydatagrid copied to clipboard

Databricks compatibility

Open xiaobigmeow opened this issue 1 year ago • 3 comments

Is it possible to run ipydatagrid in Databricks?

When I tried to run a simple example, I get an error: Error displaying widget: Cannot read properties of undefined (reading 'length')

xiaobigmeow avatar Aug 18 '24 03:08 xiaobigmeow

Thanks for opening an issue, which simple example have you tried?

Looking at the error message, you may have found an actual bug in the ipydatagrid TypeScript code

martinRenou avatar Aug 19 '24 08:08 martinRenou

df = pd.DataFrame(
    {
        "A": 1.0,
        "B": pd.Timestamp("20130102"),
        "C": pd.Series(1, index=list(range(4)), dtype="float32"),
        "D": pd.Categorical(["test", "train", "test", "train"]),
        "E": "foo",
    }
)

datagrid = ipydatagrid.DataGrid(df)
datagrid

xiaobigmeow avatar Aug 28 '24 07:08 xiaobigmeow

I ran in to issues on Databricks with 1.3.0+ as well. Rendering any pandas dataframe gives:

Error displaying widget: e.data[i].value is undefined

Up through 1.2.1 worked fine.

1.3.0:

image

1.2.1

image

andrewgross avatar Oct 17 '24 16:10 andrewgross

Just wanted to add that i am getting the exact same error message as @xiaobigmeow

brain246 avatar Jul 14 '25 13:07 brain246