# Adding Multiple Data Columns to an Existing .VTU File

**URL:** https://discourse.paraview.org/t/adding-multiple-data-columns-to-an-existing-vtu-file/10333
**Category:** ParaView Support
**Tags:** vtk, python
**Created:** [September 15, 2022, 10:07pm UTC](https://discourse.paraview.org/t/adding-multiple-data-columns-to-an-existing-vtu-file/10333 "2022-09-15T22:07:12Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ABAM](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/c67d28/32.png) [@ABAM](https://discourse.paraview.org/u/ABAM)
#### Post date: [September 15, 2022, 10:07pm UTC](https://discourse.paraview.org/t/adding-multiple-data-columns-to-an-existing-vtu-file/10333/1 "2022-09-15T22:07:12Z")

</div>

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:

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

```

Thanks,

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 16, 2022, 2:43am UTC](https://discourse.paraview.org/t/adding-multiple-data-columns-to-an-existing-vtu-file/10333/2 "2022-09-16T02:43:58Z")

</div>

Hi @ABAM ,

Please share file.dat

Best,

---

<div class="post-metadata">

### Author: ![ABAM](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/c67d28/32.png) [@ABAM](https://discourse.paraview.org/u/ABAM)
#### Post date: [September 16, 2022, 4:54am UTC](https://discourse.paraview.org/t/adding-multiple-data-columns-to-an-existing-vtu-file/10333/3 "2022-09-16T04:54:00Z")

</div>

Hi @mwestphal

The attached is the my data, this file has 200 columns and 147 rows.  
[file.dat](https://discourse.paraview.org/uploads/short-url/oWEaXONOWSYLzOB4K7vtDdPfjnv.dat) (342.5 KB)

Thanks,

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 16, 2022, 5:52am UTC](https://discourse.paraview.org/t/adding-multiple-data-columns-to-an-existing-vtu-file/10333/4 "2022-09-16T05:52:01Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ABAM](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/c67d28/32.png) [@ABAM](https://discourse.paraview.org/u/ABAM)
#### Post date: [September 16, 2022, 5:56am UTC](https://discourse.paraview.org/t/adding-multiple-data-columns-to-an-existing-vtu-file/10333/5 "2022-09-16T05:56:54Z")

</div>

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…”)
