title: use jupyter widgets to save clicks on a pandas dataframe
body: <p>Basically what I'm trying to do is make a pandas dataframe clickable and saving the clicks the user made.</p>
  
  <p>Thought about using widgets for that.</p>
  
  <p>so far I have this:</p>
  
  <pre><code>import pandas as pd
  from IPython.display import display, HTML
  from ipywidgets import widgets
  
  df = pd.DataFrame([[1,'car'],[2,'bus'],[3,'train']])
  
  click_list = []
  
  display(df[:1]) 
  button = widgets.Button(description='click')
  display(button)
  def obc(b):
      click_list.append((pd.to_datetime('now'),1)) 
  button.on_click(obc)
  
  button2 = widgets.Button(description='click')
  display(button2)
  def obc2(b):
      click_list.append((pd.to_datetime('now'),2))
  display(df[1:2])  
  button2.on_click(obc2)
  
  button3 = widgets.Button(description='click')
  display(button3)
  def obc3(b):
      click_list.append((pd.to_datetime('now'),3))
  display(df[2:3])  
  button3.on_click(obc3)
  </code></pre>
  
  <p>which give out this:</p>
  
  <p><a href="https://i.stack.imgur.com/Oj7D4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Oj7D4.png" alt="enter image description here"></a></p>
  
  <p>it has the the basic functionality I'm after, but it is displayed in a confusing way (especially if we are talking about tens of rows) I would like to have something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/cc5xs.png" rel="noreferrer"><img src="https://i.stack.imgur.com/cc5xs.png" alt="enter image description here"></a></p>
  
  <p>or similar, any help will be much appriciated</p>