Adding Multiple Data Columns to an Existing .VTU File

Dear experts,

I need to add multiple data columns to an existing .VTU file. I have a .dat file that includes 200 columns and 1000 rows, and I need to add them the existing VTU file with 200 names like sp1, sp2,…sp200.
I do not know how to using a loop for the 200 columns and add them with sequence name.

This part of my code that I could not complete:

##################################################
meshNew = dsa.WrapDataObject(mesh)
Data = pd.read_table("file.dat", header =None)
Array = np.array(Data)
meshNew.CellData.append(Array, "..names...")
################################################

Thanks,

Hi @ABAM ,

Please share file.dat

Best,

Hi @mwestphal

The attached is the my data, this file has 200 columns and 147 rows.
file.dat (342.5 KB)

Thanks,

Your tables are not named, you should name them yourself.

names in the following line is to add heading to the column, but I failed to add all columns once. I used the mentioned code to add only one column and name it, but I could not do the same for all columns
meshNew.CellData.append(Array, “…names…”)