def write_csv(self, file: str, table: str, libref: str = '<STR_LIT>',<EOL>dsopts: dict = None, opts: dict = None) -> str:
dsopts = dsopts if dsopts is not None else {}<EOL>opts = opts if opts is not None else {}<EOL>log = self._io.write_csv(file, table, libref, self.nosub, dsopts, opts)<EOL>if not self.batch:<EOL><INDENT>print(log)<EOL><DEDENT>else:<EOL><INDENT>return log<EOL><DEDENT>
:param file: the OS filesystem path of the file to be created (exported from the SAS Data Set)
:param table: the name of the SAS Data Set you want to export to a CSV file
:param libref: the libref for the SAS Data Set being created. Defaults to WORK, or USER if assigned
:param dsopts: a dictionary containing any of the following SAS data set options(where, drop, keep, obs, firstobs)
:param opts: a dictionary containing any of the following Proc Export options(delimiter, putnames)

    - 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: SAS log