code: def sample(self, fraction, seed=None, exact=False):
          
          if seed is None:
              seed = abs(hash("%0.20f" % time.time())) % (2 ** 31)
  
          if (fraction > 1 or fraction < 0):
              raise ValueError('Invalid sampling rate: ' + str(fraction))
  
  
          if (self.num_rows() == 0 or self.num_columns() == 0):
              return self
          else:
              with cython_context():
                  return SFrame(_proxy=self.__proxy__.sample(fraction, seed, exact))
docs: Sample a fraction of the current SFrame's rows.
  
          Parameters
          ----------
          fraction : float
              Fraction of the rows to fetch. Must be between 0 and 1.
              if exact is False (default), the number of rows returned is
              approximately the fraction times the number of rows.
  
          seed : int, optional
              Seed for the random number generator used to sample.
  
          exact: bool, optional
              Defaults to False. If exact=True, an exact fraction is returned, 
              but at a performance penalty.
  
          Returns
          -------
          out : SFrame
              A new SFrame containing sampled rows of the current SFrame.
  
          Examples
          --------
          Suppose we have an SFrame with 6,145 rows.
  
          >>> import random
          >>> sf = SFrame({'id': range(0, 6145)})
  
          Retrieve about 30% of the SFrame rows with repeatable results by
          setting the random seed.
  
          >>> len(sf.sample(.3, seed=5))
          1783