Saving data as .csv files

I was mistaken when I said VTK would store a tuple. Each variable goes into its own array, and every array has a name.

Use GetArrayName:

>>> print(data.GetNumberOfArrays())
3
>>> print(data.GetArrayName(0))
U_G

Note that this is contained in the code Justin posted above.

Also if you’re trying to learn VTK, at an interactive Python prompt you can type
>>> help(data)

(where data is a VTK data object) you will get a list of all the methods available with a description of each. Or consult a VTK manual.