def to_csv(self, file: str, opts: dict=None) -> str:
    '\n        This method will export a SAS Data Set to a file in CSV format.\n\n        :param file: the OS filesystem path of the file to be created (exported from this SAS Data Set)\n        :return:\n        '
    opts = (opts if (opts is not None) else {})
    ll = self._is_valid()
    if ll:
        if (not self.sas.batch):
            print(ll['LOG'])
        else:
            return ll
    else:
        return self.sas.write_csv(file, self.table, self.libref, self.dsopts, opts)
This method will export a SAS Data Set to a file in CSV format.

:param file: the OS filesystem path of the file to be created (exported from this SAS Data Set)
:return:
def to_csv(self, file: str, opts: dict=None) -> str:
    '\n        This method will export a SAS Data Set to a file in CSV format.\n\n        :param file: the OS filesystem path of the file to be created (exported from this SAS Data Set)\n        :return:\n        '
    opts = (opts if (opts is not None) else {})
    ll = self._is_valid()
    if ll:
        if (not self.sas.batch):
            print(ll['LOG'])
        else:
            return ll
    else:
        return self.sas.write_csv(file, self.table, self.libref, self.dsopts, opts)