code: def as_csv(self):
          
  
          from io import StringIO
  
          s = StringIO()
          w = csv.writer(s)
          for row in self.rows:
              w.writerow(row)
  
          return s.getvalue()
docs: Return a CSV representation as a string