pykg2tbl/service.py
def as_csv(self, fileoutputlocation:str, sep:str=","):
        """
        convert and outputs csv file from result query
        
        :param fileoutputlocation: location + filename where the csv should be written to.
        :param sep: delimiter that should be used for writing the csv file. 
        """
        # open the file in the write mode
        f = open(fileoutputlocation, 'w', newline="")
        # create the csv writer
        writer = csv.DictWriter(f, self._data[0].keys(),delimiter=sep)
        # write a row to the csv file
        for row in self._data:
            writer.writerow(row)
        # close the file
        f.close()

        convert and outputs csv file from result query
        
        :param fileoutputlocation: location + filename where the csv should be written to.
        :param sep: delimiter that should be used for writing the csv file. 
        
convert and outputs csv file from result query
convert and outputs csv file from result query
def as_csv(self, fileoutputlocation:str, sep:str=","):
        f = open(fileoutputlocation, 'w', newline="")
        writer = csv.DictWriter(f, self._data[0].keys(),delimiter=sep)
        for row in self._data:
            writer.writerow(row)
        f.close()
def as_csv ( self , fileoutputlocation : str , sep : str = "," ) : f = open ( fileoutputlocation , 'w' , newline = "" ) writer = csv . DictWriter ( f , self . _data [ 0 ] . keys ( ) , delimiter = sep ) for row in self . _data : writer . writerow ( row ) f . close ( )
convert and outputs csv file from result query
convert and outputs csv file from result query
"""
        convert and outputs csv file from result query
        
        :param fileoutputlocation: location + filename where the csv should be written to.
        :param sep: delimiter that should be used for writing the csv file. 
        """ # open the file in the write mode # create the csv writer # write a row to the csv file # close the file
self
fileoutputlocation
str
location + filename where the csv should be written to.
location + filename where the csv should be written to .
sep
str
delimiter that should be used for writing the csv file.
delimiter that should be used for writing the csv file .