code: def to_dataframe(self, dtypes=None):
          
          if pandas is None:
              raise ImportError(_PANDAS_REQUIRED)
  
          if dtypes is None:
              dtypes = {}
  
          columns = collections.defaultdict(list)
          for row in self:
              for column in row:
                  columns[column].append(row[column])
          for column in dtypes:
              columns[column] = pandas.Series(columns[column], dtype=dtypes[column])
          return pandas.DataFrame(columns, columns=self._column_names)
docs: Create a :class:`pandas.DataFrame` of rows in the page.
  
          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:
              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.