code: def format(self, source):
          
          self._jwrite = self._jwrite.format(source)
          return self
docs: Specifies the underlying output data source.
  
          :param source: string, name of the data source, e.g. 'json', 'parquet'.
  
          >>> df.write.format('json').save(os.path.join(tempfile.mkdtemp(), 'data'))