docs: def sample(self, n):
      """Samples data into a Pandas DataFrame. Note that it calls BigQuery so it will
         incur cost.
  
      Args:
        n: number of sampled counts. Note that the number of counts returned is approximated.
      Returns:
        A dataframe containing sampled data.
      Raises:
        Exception if n is larger than number of rows.
      """
      total = bq.Query('select count(*) from %s' %
                       self._get_source()).execute().result()[0].values()[0]
      if n > total:
        raise ValueError('sample larger than population')
      sampling = bq.Sampling.random(percent=n * 100.0 / float(total))
      if self._query is not None:
        source = self._query
      else:
        source = 'SELECT * FROM `%s`' % self._table
      sample = bq.Query(source).execute(sampling=sampling).result()
      df = sample.to_dataframe()
      return df