code: def tail(self, obs=5):
          
          code = "proc sql;select count(*) format best32. into :lastobs from " + self.libref + '.' + self.table + self._dsopts() + ";%put lastobs=&lastobs tom;quit;"
  
          nosub = self.sas.nosub
          self.sas.nosub = False
  
          le = self._is_valid()
          if not le:
              ll = self.sas.submit(code, "text")
  
              lastobs = ll['LOG'].rpartition("lastobs=")
              lastobs = lastobs[2].partition(" tom")
              lastobs = int(lastobs[0])
          else:
              lastobs = obs
  
          firstobs = lastobs - (obs - 1)
          if firstobs < 1:
              firstobs = 1
  
          topts = dict(self.dsopts)
          topts['obs'] = lastobs
          topts['firstobs'] = firstobs
  
          code = "proc print data=" + self.libref + '.' + self.table + self.sas._dsopts(topts) + ";run;"
  
          self.sas.nosub = nosub
          if self.sas.nosub:
              print(code)
              return
  
          if self.results.upper() == 'PANDAS':
              code = "data _tail ; set %s.%s %s; run;" % (self.libref, self.table, self.sas._dsopts(topts))
              return self._returnPD(code, '_tail')
          else:
              if self.HTML:
                  if not le:
                      ll = self.sas._io.submit(code)
                  else:
                      ll = le
                  if not self.sas.batch:
                      self.sas.DISPLAY(self.sas.HTML(ll['LST']))
                  else:
                      return ll
              else:
                  if not le:
                      ll = self.sas._io.submit(code, "text")
                  else:
                      ll = le
                  if not self.sas.batch:
                      print(ll['LST'])
                  else:
                      return ll
docs: display the last n rows of a table
  
          :param obs: the number of rows of the table that you want to display. The default is 5
          :return: