How to set the depth of the cylinder?
It is because you are trying to set the depth of an object, not a cylindre. Once the cylinder is created, it is impossible to chage the "generation" parameters. A solution would be to create a new cylindre each time in your loop instead of making a copy of the previous one.

bpy.ops.mesh.primitive_cylinder_add(radius= 0.02, depth=value[3])
ob1 = bpy.context.scene.objects.active
ob1.rotation_euler = cylinder.rotation_euler 
...