Return a table and button

I generate a table with the above function which is placed inside the Div with id=‘container’. My question now is there a way to access the data in the table as an input for a callback

def generate_table(dataframe, max_rows):
    return html.Table(
        # Header
         [html.Tr([html.Th(col) for col in dataframe.columns])] +

        # Body
        [html.Tr(html.A([html.Td(dataframe.iloc[i][col]) for col in dataframe.columns], 
                 href=link+dataframe.iloc[i][0])) 
        for i in range(min(len(dataframe), max_rows))]

)


app.layout = html.Div(children=[

    html.Div(id='container'),

])

I think I may misunderstand your question.
You have all your data in a dataframe and you need to know how to access your dataframe to use as input for something.?
Just find the index of the data you want from your dataframe in your code.
https://pandas.pydata.org/pandas-docs/stable/indexing.html