def obs(self):
code = "<STR_LIT>" + self.libref + '<STR_LIT:.>' + self.table + self._dsopts() + "<STR_LIT>"<EOL>if self.sas.nosub:<EOL><INDENT>print(code)<EOL>return<EOL><DEDENT>le = self._is_valid()<EOL>if not le:<EOL><INDENT>ll = self.sas.submit(code, "<STR_LIT:text>")<EOL>lastobs = ll['<STR_LIT>'].rpartition("<STR_LIT>")<EOL>lastobs = lastobs[<NUM_LIT:2>].partition("<STR_LIT>")<EOL>lastobs = int(lastobs[<NUM_LIT:0>])<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>")<EOL>lastobs = None<EOL><DEDENT>return lastobs<EOL>
return the number of observations for your SASdata object