title: Clear widget area of a cell in a Jupyter notebook from within notebook
body: <p>I'm wondering if it's possible to clear the widget area of a cell in a Jupyter notebook from the notebook side (ie within Python). <code>IPython.display.clear_output()</code> only clears the cell's output area not the widget area.</p>
  
  <p>Update: this still seems to be a problem in latest Notebook and ipywidgets. Here are two minimal examples illustrating the problem I'm struggling with. The widget output that I'm trying to clear in particular are the data frames rendered by <a href="https://github.com/quantopian/qgrid" rel="noreferrer">qgrid</a>. In both cases, despite trying to clear the previous widget output, subsequent selections cause a table to be appended after the previous one. Each new table is appended as a div with the class <code>p-Widget</code>.  </p>
  
  <pre><code>import pandas as pd
  import numpy as np
  import qgrid
  from ipywidgets import interact
  from IPython.display import display, clear_output
  import notebook
  import ipywidgets
  
  print('Jupyter Notebook version: {}'.format(notebook.__version__))
  print('ipywidgets version: {}'.format(ipywidgets.__version__))
  
  max_columns = 10
  max_rows = 10    
  col_opts = list(range(1, max_columns + 1))
  row_opts = list(range(1, max_rows + 1))
  </code></pre>
  
  <p>First attempt using interact:</p>
  
  <pre><code>@interact(columns=col_opts, rows=row_opts)
  def submit(columns, rows):
      df = pd.DataFrame(np.random.randint(0, 100, size=(rows, columns)))
      clear_output()
      display(qgrid.QGridWidget(df=df)
  </code></pre>
  
  <p>Second attempt using the Output widget:</p>
  
  <pre><code>output = ipywidgets.Output()
  display(output)
  
  def submit2(change):
      rows = row_input.value
      columns = col_input.value
      df = pd.DataFrame(np.random.randint(0, 100, size=(rows, columns)))
  
      with output:
          output.clear_output()
          display(qgrid.QGridWidget(df=df))
  
  col_input = ipywidgets.Dropdown(options=col_opts)
  row_input = ipywidgets.Dropdown(options=row_opts)
  
  col_input.observe(submit2, 'value')
  row_input.observe(submit2, 'value')
  
  display(col_input)
  display(row_input)
  </code></pre>