code: def csv(self, fh):
          
          self._stats.to_csv(fh, encoding='utf-8', index=False)
          return fh
docs: Writes the report data to `fh` in CSV format and returns it.
  
          :param fh: file to write data to
          :type fh: file object
          :rtype: file object