Issue with Clicking Specific Cells in a Streamlit Pivot Table to Display Filtered Data

I want the row data before pivoting when creating a pivot table from the above DataFrame. However, cell selection is not working, and only the row is being selected, which causes an error.