posit-dev / posit-dev/py-shiny
DataGrid not showing using ui.output_data_frame
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 135
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 21
Description
I'm using DataGrid and render.data_frame to be able to do row selection but the data frame is not displaying. When debugging, the returned object is a DataGrid shiny object. If I'm using basic pd.DataFrame everything is right.
Here, the server part :
@output
@render.data_frame
def feature_selection():
meth = input.meth_graph()
results = tranformed_data().dict_results[meth][2]
to_return = pd.DataFrame([raw_data().features,results]).T
return render.DataGrid(
to_return,
row_selection_mode = 'multiple')
Here the ui part :
ui.nav(
ui.row(
ui.output_data_frame('feature_selection')
)
)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided server and UI code with render.DataGrid and ui.output_data_frame, then inspect the data-frame rendering path and its handling of DataGrid objects. Done means the returned DataGrid is displayed and multiple row selection works as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pandas, python
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100