def append(self, data):
        """Append rows to an existing CSV file."""
        # CSV file exists, append rows
        if os.path.exists(self.file_path):
            return self.write(data, method='a')
        # CSV file does NOT exist, create new file and write rows
        else:
            return self.write(data, method='w')
def append ( self , data ) : if os . path . exists ( self . file_path ) : return self . write ( data , method = 'a' ) else : return self . write ( data , method = 'w' )
Append rows to an existing CSV file.