class_docstr: A set of excellent Records from a query.
class_docstr_tok: ["A","set","of","excellent","Records","from","a","query","."]
docstr: A Tablib Dataset representation of the RecordCollection.
docstr_tok: ["A","Tablib","Dataset","representation","of","the","RecordCollection","."]
code: def dataset(self):
      """A Tablib Dataset representation of the RecordCollection."""
      # Create a new Tablib Dataset.
      data = tablib.Dataset()
  
      # If the RecordCollection is empty, just return the empty set
      # Check number of rows by typecasting to list
      if len(list(self)) == 0:
          return data
  
      # Set the column names as headers on Tablib Dataset.
      first = self[0]
  
      data.headers = first.keys()
      for row in self.all():
          row = _reduce_datetimes(row.values())
          data.append(row)
  
      return data
  
imports: import os
  from sys import stdout
  from collections import OrderedDict
  from contextlib import contextmanager
  from inspect import isclass
  import tablib
  from docopt import docopt
  from sqlalchemy import create_engine, exc, inspect, text
label_desc: Use image node_id 9 for calling the RecordCollection obj's underlying member method code with example usage: obj.dataset() and returns: data, data