code: def fetch(engine, tablename, columns=None, selection=None, **kwargs):
      
      import pandas as pd
  
      # parse columns for SQL query
      if columns is None:
          columnstr = '*'
      else:
          columnstr = ', '.join('"%s"' % c for c in columns)
  
      # parse selection for SQL query
      selectionstr = format_db_selection(selection, engine=engine)
  
      # build SQL query
      qstr = 'SELECT %s FROM %s %s' % (columnstr, tablename, selectionstr)
  
      # perform query
      tab = pd.read_sql(qstr, engine, **kwargs)
  
      # Convert unicode columns to string
      types = tab.apply(lambda x: pd.api.types.infer_dtype(x.values))
  
      if not tab.empty:
          for col in types[types == 'unicode'].index:
              tab[col] = tab[col].astype(str)
  
      return Table.from_pandas(tab).filled()
docs: Fetch data from an SQL table into an `EventTable`
  
      Parameters
      ----------
      engine : `sqlalchemy.engine.Engine`
          the database engine to use when connecting
  
      table : `str`,
          The name of table you are attempting to receive triggers
          from.
  
      selection
          other filters you would like to supply
          underlying reader method for the given format
  
      .. note::
  
         For now it will attempt to automatically connect you
         to a specific DB. In the future, this may be an input
         argument.
  
      Returns
      -------
      table : `GravitySpyTable`