def write_csv(self, file: str, table: str, libref: str ="<STR_LIT>", nosub: bool =False, dsopts: dict = None, opts: dict = None) -> '<STR_LIT>':
dsopts = dsopts if dsopts is not None else {}<EOL>opts = opts if opts is not None else {}<EOL>code  = "<STR_LIT>"<EOL>code += "<STR_LIT>"+file+"<STR_LIT>"<EOL>code += "<STR_LIT>"+libref+"<STR_LIT:.>"+table+self._sb._dsopts(dsopts)+"<STR_LIT>"<EOL>code += "<STR_LIT>"+self._sb._expopts(opts)+"<STR_LIT>"<EOL>code += "<STR_LIT>"<EOL>if nosub:<EOL><INDENT>print(code)<EOL><DEDENT>else:<EOL><INDENT>ll = self.submit(code, "<STR_LIT:text>")<EOL>return ll['<STR_LIT>']<EOL><DEDENT>
This method will export a SAS Data Set to a file in CSV format.
file    - the OS filesystem path of the file to be created (exported from the SAS Data Set)
table   - the name of the SAS Data Set you want to export to a CSV file
libref  - the libref for the SAS Data Set.
dsopts  - a dictionary containing any of the following SAS data set options(where, drop, keep, obs, firstobs)
opts    - a dictionary containing any of the following Proc Export options(delimiter, putnames)