Extracting selectedData from underlying dataframe

Hi,

I have a scatter plot built using px as part of a dash application. I would like to extract the indices of the points selected in the pandas dataframe, so I can use the information in the other columns of the dataframe. I was unclear about what the pointIndex and pointNumber corresponded. They do not correspond to the initial dataframe indices.

Thank you!