def tail(self, obs=5):
    '\n        display the last n rows of a table\n\n        :param obs: the number of rows of the table that you want to display. The default is 5\n        :return:\n        '
    code = 'proc sql;select count(*) format best32. into :lastobs from '
    code += (((self.libref + '.') + self.table) + self._dsopts())
    code += ';%put lastobs=&lastobs lastobsend=;\nquit;'
    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(' lastobsend=')
        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) + '.')
    code += ((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')
    elif 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
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:
def tail(self, obs=5):
    '\n        display the last n rows of a table\n\n        :param obs: the number of rows of the table that you want to display. The default is 5\n        :return:\n        '
    code = 'proc sql;select count(*) format best32. into :lastobs from '
    code += (((self.libref + '.') + self.table) + self._dsopts())
    code += ';%put lastobs=&lastobs lastobsend=;\nquit;'
    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(' lastobsend=')
        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) + '.')
    code += ((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')
    elif 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