def sasdata(self, table: str, libref: str = '<STR_LIT>', results: str = '<STR_LIT>', dsopts: dict = None) -> '<STR_LIT>':
dsopts = dsopts if dsopts is not None else {}<EOL>if results == '<STR_LIT>':<EOL><INDENT>results = self.results<EOL><DEDENT>sd = SASdata(self, libref, table, results, dsopts)<EOL>if not self.exist(sd.table, sd.libref):<EOL><INDENT>if not self.batch:<EOL><INDENT>print(<EOL>"<STR_LIT>" + sd.libref + '<STR_LIT:.>' + sd.table + "<STR_LIT>")<EOL><DEDENT><DEDENT>return sd<EOL>
Method to define an existing SAS dataset so that it can be accessed via SASPy

:param table:   the name of the SAS Data Set
:param libref:  the libref for the Data Set, defaults to WORK, or USER if assigned
:param results: format of results, SASsession.results is default, Pandas, HTML and TEXT are the valid options
:param dsopts: a dictionary containing any of the following SAS data set options(where, drop, keep, obs, firstobs):

    - where is a string
    - keep are strings or list of strings.
    - drop are strings or list of strings.
    - obs is a numbers - either string or int
    - first obs is a numbers - either string or int
    - format is a string or dictionary { var: format }

    .. code-block:: python

                     {'where'    : 'msrp < 20000 and make = "Ford"'
                      'keep'     : 'msrp enginesize Cylinders Horsepower Weight'
                      'drop'     : ['msrp', 'enginesize', 'Cylinders', 'Horsepower', 'Weight']
                      'obs'      :  10
                      'firstobs' : '12'
                      'format'  : {'money': 'dollar10', 'time': 'tod5.'}
                     }

:return: SASdata object