Hello, Shiny for Python users. We have some great new features for you in the latest release!
Introducing data grid / data table
We’ve added a new, fast-scrolling data table output.
It can easily handle tables with tens of thousands of rows, and supports sorting by columns – just click on the column header to sort.
In addition to the grid-style appearance, the data can be displayed with a more traditional table-like appearance.
These tables aren’t just for displaying data – they can also allow you to select rows, use that selection as an input, as shown here:
To use the new tables, put this in your application’s UI:
"mygrid") ui.output_data_frame(
And in your server function, use @render.data_frame
and give it a function that returns a render.DataGrid()
; in turn, that function a Pandas data frame.
@output
@render.data_frame
def mygrid():
return render.DataGrid(my_df)
To get the more traditional table-like styling, return a render.DataTable()
instead.