Ipydatagrid doesn't display data, only tiny scroll bars unless I save and reload from disk (original) (raw)
When I try to display a simple dataframe using ipydatagrid I just get some small scroll bars:
It’ll usually display correctly with this toy dataframe.
import pandas as pd
from ipydatagrid import DataGrid
from IPython.display import display
# Create a simple DataFrame
df = pd.DataFrame({
"Name": ["Alice", "Bob", "Charlie"],
"Age": [25, 30, 35],
"City": ["NYC", "LA", "Chicago"]
})
# Create a DataGrid from the DataFrame
grid = DataGrid(df)
# Display the DataGrid in the notebook
display(grid)
The dataframe I was originally trying to display using essentially the same code as above was only 3 columns by 84 rows. I’ve figured out I can get it to work if I save the notebook and reload it from disk, but that’s rather tedious. I’ve had this problem in both the latest version of Safari and also Chromium.
Any advice to getting this to work reliably?