Open
Description
Description:
I am trying to use the DataGrid component in the Shiny Express library to display a DataFrame that includes an empty column. However, it seems that the DataGrid does not support empty column names. Below is an example code demonstrating the issue:
import pandas as pd
from shiny.express import render, ui
n = 6
df = pd.DataFrame(
{
"": range(n),
"b": range(n, n * 2),
"c": range(n * 2, n * 3),
"d": range(n * 3, n * 4),
"e": range(n * 4, n * 5),
}
)
ui.h2("Data Frame with Styles applied to 4 cells")
@render.data_frame
def my_df():
return render.DataGrid(df)
Current Behavior: The DataGrid fails to render the DataFrame when an empty column name is present.
Expected Behavior: The DataGrid should support DataFrames with empty column names and render them appropriately.