Import csv to Python syntax eludes me, what did I miss?
There were a couple of issues with the code.

The 'obj.select = True' line was referencing an invalid property of 'obj'. I've simply disabled that line.
I've put back in the commented out code in the last function to use the values extracted from the CSV. Note that the CSV data is returned as strings so each value needs 'casting' into the expected type - ie, to cast PARTS into an integer you can use `int(PARTS)'.

Here's my amended code - additionally implementing XW and YW for the width and depth of each circle (I changed the other functions to pass them through and use them in the calculation of the vertex position :
# -*- coding: utf-8 -*-
&quot;&quot;&quot;
Name: 'Add cirkel'
Blender: 2.80
Group: 'Add'
Tooltip: 'Creates a shape object'
&quot;&quot;&quot;

import bpy, csv
import bpy.types
import time
from mathutils import *
import math

fp = &quot;C:/Users/rich/Desktop/generate-object.csv&quot;


def object_from_data(data, name, scene, select=True):
    &quot;&quot;&quot; Create a mesh object and link it to a scene &quot;&quot;&quot;
    mesh = bpy.data.meshes.new(name)
    mesh.from_pydata(data['verts'], data['edges'], data['faces'])

    obj = bpy.data.objects.new(name, mesh)
    scene.collection.objects.link(obj)
    bpy.context.view_layer.objects.active = obj
    #obj.select = True
    mesh.validate(verbose=True) 
    return obj

def vertex_circle(segments, xw, yw, z):
    &quot;&quot;&quot; Return a ring of vertices &quot;&quot;&quot;
    verts = []
    verts.append(( 0, 0, z))
    for j in range(segments):
        angle = (math.pi*2) * j / segments
        verts.append((math.cos(angle)*xw, math.sin(angle)*yw, z))
    return verts

def add_circle(name, segments, xw, yw, z):
    &quot;&quot;&quot; Make a circle &quot;&quot;&quot;

    data = {
    'verts': vertex_circle(segments, xw, yw, z),
    'edges': [],
    'faces': [],
    }
    data['faces'] = [(j, j+1, 0) for j in range(segments)]
    data['faces'].append((segments, 1, 0))

    scene = bpy.context.scene
    return object_from_data(data, name, scene)

with open( fp ) as csvfile:
    &quot;&quot;&quot; make series of circles &quot;&quot;&quot;
    rdr = csv.reader( csvfile )
    for i, row in enumerate( rdr ):
        if i == 0: continue # Skip column titles
        #FRAME, PARTS, XW = row[0:3]
        #add_circle(FRAME, 8, 0)

        FRAME, PARTS, XW, YW, Z, EXP1, EXP2, WALL = row[0:8]
        parts_number = float(PARTS)
        #add_circle(FRAME, 8, 0, 2, 0, 1, 2)
        #add_circle(FRAME, parts_number, 0, 2, 0, 1, 2)
        #if WALL == 1: add_circle2() else: add_circle()
        add_circle(FRAME, int(PARTS), float(XW), float(YW), float(Z))

Here are the results from your sample CSV file (you need to amend the code to point at the location of the file if different to mine) :