Help with data.csv code

Based on your code, mousePressed is expecting the first line of your CSV file to be a header line, and to contain (in some order):

x, y, diameter, name

So if instead of “x” your first line contains “X” or “x-value” – or anything else – setting the column “x” will fail, because it doesn’t exist.