code: def to_dataframe(self, read_session, dtypes=None):
          
          if fastavro is None:
              raise ImportError(_FASTAVRO_REQUIRED)
          if pandas is None:
              raise ImportError(_PANDAS_REQUIRED)
  
          return self.rows(read_session).to_dataframe(dtypes=dtypes)
docs: Create a :class:`pandas.DataFrame` of all rows in the stream.
  
          This method requires the pandas libary to create a data frame and the
          fastavro library to parse row blocks.
  
          .. warning::
              DATETIME columns are not supported. They are currently parsed as
              strings in the fastavro library.
  
          Args:
              read_session ( \
                  ~google.cloud.bigquery_storage_v1beta1.types.ReadSession \
              ):
                  The read session associated with this read rows stream. This
                  contains the schema, which is required to parse the data
                  blocks.
              dtypes ( \
                  Map[str, Union[str, pandas.Series.dtype]] \
              ):
                  Optional. A dictionary of column names pandas ``dtype``s. The
                  provided ``dtype`` is used when constructing the series for
                  the column specified. Otherwise, the default pandas behavior
                  is used.
  
          Returns:
              pandas.DataFrame:
                  A data frame of all rows in the stream.