code: def format(self, source):
          
          self._jreader = self._jreader.format(source)
          return self
docs: Specifies the input data source format.
  
          :param source: string, name of the data source, e.g. 'json', 'parquet'.
  
          >>> df = spark.read.format('json').load('python/test_support/sql/people.json')
          >>> df.dtypes
          [('age', 'bigint'), ('name', 'string')]