code: def enable(dataframe=True, series=True):
      
      try:
          from IPython.core.getipython import get_ipython
      except ImportError:
          raise ImportError('This feature requires IPython 1.0+')
  
      ip = get_ipython()
      ip_formatter = ip.display_formatter.ipython_display_formatter
  
      if dataframe:
          ip_formatter.for_type(pd.DataFrame, _display_as_qgrid)
      else:
          ip_formatter.type_printers.pop(pd.DataFrame, None)
  
      if series:
          ip_formatter.for_type(pd.Series, _display_as_qgrid)
      else:
          ip_formatter.type_printers.pop(pd.Series)
docs: Automatically use qgrid to display all DataFrames and/or Series
      instances in the notebook.
  
      Parameters
      ----------
      dataframe : bool
          Whether to automatically use qgrid to display DataFrames instances.
      series : bool
          Whether to automatically use qgrid to display Series instances.