2021年4月28日星期三

How to read selected row from a shown pandas dataframe as output in ipywidgets

I have a pandas dataframe displayed through a widgets.Output() in a simple dashboard. What I want to do is read what row the user clicked so I can further process data. The following is an example of the dataframe shown through the ipywidget.

Dataframe example

Basically, I want to know either the index or the value when the user selects a given row. Say:

User pressed the M23 row

Is there a way I can read this?

https://stackoverflow.com/questions/67309438/how-to-read-selected-row-from-a-shown-pandas-dataframe-as-output-in-ipywidgets April 29, 2021 at 08:11AM

没有评论:

发表评论