datagen/io_helper.py
def write_as_csv(self, dataframe_to_persist, output_location, **kwargs):
        """ Persists pandas dataframe as csv file. 
        Args:
            dataframe_to_persist: pandas data frame to persist as csv file
            output_location: output file location, can be s3/local file system
            kwargs: dict of parameters that will be passed to pandas to_csv
        Returns:
            status of write operation
        Raises:
            IOException if df cann't be persisted as csv
        """
        filesystem = self._determite_file_system(output_location)
        try:
            if isinstance(filesystem, S3FileSystem):
                with filesystem.open(output_location,'w') as f:
                    dataframe_to_persist.to_csv(f, **kwargs)
            else:
                dataframe_to_persist.to_csv(output_location, **kwargs)
        except Exception as e:
            raise IOException("Cann't persist dataframe as csv, exception {0} occurred.".format(e))
        return True
 Persists pandas dataframe as csv file. 
        Args:
            dataframe_to_persist: pandas data frame to persist as csv file
            output_location: output file location, can be s3/local file system
            kwargs: dict of parameters that will be passed to pandas to_csv
        Returns:
            status of write operation
        Raises:
            IOException if df cann't be persisted as csv
        
Persists pandas dataframe as csv file.
Persists pandas dataframe as csv file .
def write_as_csv(self, dataframe_to_persist, output_location, **kwargs):
        filesystem = self._determite_file_system(output_location)
        try:
            if isinstance(filesystem, S3FileSystem):
                with filesystem.open(output_location,'w') as f:
                    dataframe_to_persist.to_csv(f, **kwargs)
            else:
                dataframe_to_persist.to_csv(output_location, **kwargs)
        except Exception as e:
            raise IOException("Cann't persist dataframe as csv, exception {0} occurred.".format(e))
        return True
def write_as_csv ( self , dataframe_to_persist , output_location , ** kwargs ) : filesystem = self . _determite_file_system ( output_location ) try : if isinstance ( filesystem , S3FileSystem ) : with filesystem . open ( output_location , 'w' ) as f : dataframe_to_persist . to_csv ( f , ** kwargs ) else : dataframe_to_persist . to_csv ( output_location , ** kwargs ) except Exception as e : raise IOException ( "Cann't persist dataframe as csv, exception {0} occurred." . format ( e ) ) return True
Persists pandas dataframe as csv file.
Persists pandas dataframe as csv file .
""" Persists pandas dataframe as csv file. 
        Args:
            dataframe_to_persist: pandas data frame to persist as csv file
            output_location: output file location, can be s3/local file system
            kwargs: dict of parameters that will be passed to pandas to_csv
        Returns:
            status of write operation
        Raises:
            IOException if df cann't be persisted as csv
        """
self
dataframe_to_persist
output_location