def top(self, var: str, n: int = <NUM_LIT:10>, order: str = '<STR_LIT>', title: str = '<STR_LIT>') -> object:
code = "<STR_LIT>" % (self.libref, self.table, self._dsopts(), order)<EOL>code += "<STR_LIT>" % var<EOL>code += "<STR_LIT>"<EOL>if len(title) > <NUM_LIT:0>:<EOL><INDENT>code += '<STR_LIT>' + title + '<STR_LIT>'<EOL><DEDENT>code += "<STR_LIT>" % n<EOL>code += '<STR_LIT>'<EOL>if self.sas.nosub:<EOL><INDENT>print(code)<EOL>return<EOL><DEDENT>ll = self._is_valid()<EOL>if self.results.upper() == '<STR_LIT>':<EOL><INDENT>code = "<STR_LIT>" % (self.libref, self.table, self._dsopts(), order)<EOL>code += "<STR_LIT>" % var<EOL>code += "<STR_LIT>"<EOL>code += "<STR_LIT>" % n<EOL>return self._returnPD(code, '<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>if self.HTML:<EOL><INDENT>if not ll:<EOL><INDENT>ll = self.sas._io.submit(code)<EOL><DEDENT>if not self.sas.batch:<EOL><INDENT>self.sas.DISPLAY(self.sas.HTML(ll['<STR_LIT>']))<EOL><DEDENT>else:<EOL><INDENT>return ll<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if not ll:<EOL><INDENT>ll = self.sas._io.submit(code, "<STR_LIT:text>")<EOL><DEDENT>if not self.sas.batch:<EOL><INDENT>print(ll['<STR_LIT>'])<EOL><DEDENT>else:<EOL><INDENT>return ll<EOL><DEDENT><DEDENT><DEDENT>
Return the most commonly occuring items (levels)

:param var: the CHAR variable (column) you want to count
:param n: the top N to be displayed (defaults to 10)
:param order: default to most common use order='data' to get then in alphbetic order
:param title: an optional Title for the chart
:return: Data Table