Creating Objects using CSV file

I am trying to create an object( 2D Cube) and I am using a CSV file to get its x y and z coordinates I can read and log the coordinates, but they are string so I use a method to try and convert to float. But when I play the scene the objects are not created.

distance += distanceChange;

Vector3 clickPosition = new Vector3(float.Parse(data_values[0], CultureInfo.InvariantCulture.NumberFormat),
float.Parse(data_values[1], CultureInfo.InvariantCulture.NumberFormat), float.Parse(data_values[2], CultureInfo.InvariantCulture.NumberFormat));
//Vector3 clickPosition = new Vector3(Convert.ToSingle(data_values[0]),

        GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);

        cube.transform.position = clickPosition;

       Debug.Log(data_values[0].ToString() + "   " + data_values[1].ToString() + " " + data_values[2].ToString());

I am using the float.Parse(data_values[0], CultureInfo.InvariantCulture.NumberFormat code to convert to float.

You’ll have to either replace the periods with commas or change the cultureInfo

    if(float.TryParse(data_values[0], NumberStyles.Any, CultureInfo.InvariantCulture, out float x) && 
        float.TryParse(data_values[1], NumberStyles.Any, CultureInfo.InvariantCulture, out float y) && 
        float.TryParse(data_values[2], NumberStyles.Any, CultureInfo.InvariantCulture, out float z))
    {
        Vector3 clickPosition = new Vector3(x, y, z);
        GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
        cube.transform.position = clickPosition;
        Debug.Log(data_values[0].ToString() + "   " + data_values[1].ToString() + " " + data_values[2].ToString());
    }