# How to access "Row Data" in Python?

**URL:** https://discourse.paraview.org/t/how-to-access-row-data-in-python/8059
**Category:** ParaView Support
**Created:** [September 23, 2021, 2:01am UTC](https://discourse.paraview.org/t/how-to-access-row-data-in-python/8059 "2021-09-23T02:01:32Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![wsherman](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8797f3/32.png) [@wsherman](https://discourse.paraview.org/u/wsherman)
#### Post date: [September 23, 2021, 2:01am UTC](https://discourse.paraview.org/t/how-to-access-row-data-in-python/8059/1 "2021-09-23T02:01:32Z")

</div>

Hello all,

So this is an embarrassingly simple question, but I’ve Googled a lot, and am throwing in the towel and asking for directions.

I’m writing a pvbatch script that reads a cvs/ssv file, which works fine. But when viewed in ParaView proper, the spreadsheet view calls the data “Row Data”. And for the life of me, I can’t figure out how to access “Row Data” in the Python interface. There are functions for “Cell Data” and “Point Data” and “Field Data”, but no “Row Data” (nor a couple others that the Spreadsheet offers).

So I’m loading the data as follows:

```auto
frameinfo = CSVReader(registrationName='frame-info', FileName=['.../frame-info'])
frameinfo.FieldDelimiterCharacters = ' '
frameinfo.MergeConsecutiveDelimiters = 1                                                             
frameinfo.UpdatePipeline()

```

But now what? I’ve used dir() and help() in the Python shell, but again they only refer to cell/point/field data.

I did try this:

```auto
>>> calc=Calculator(Input=frameinfo)
>>> calc.Function = 'Rotation(rad)'
>>> calc.ResultArrayName='rot'
>>> calc.UpdatePipeline()

```

And that seems to produce the data, but once again I don’t know how to access the “calc” data.

```
Thanks in advance,
Bill
```

---

<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 23, 2021, 6:56am UTC](https://discourse.paraview.org/t/how-to-access-row-data-in-python/8059/2 "2021-09-23T06:56:29Z")

</div>

You are looking for `servermanager.Fetch(calc)`

---

<div class="post-metadata">

### Author: ![wsherman](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8797f3/32.png) [@wsherman](https://discourse.paraview.org/u/wsherman)
#### Post date: [September 23, 2021, 1:40pm UTC](https://discourse.paraview.org/t/how-to-access-row-data-in-python/8059/3 "2021-09-23T13:40:29Z")

</div>

Hello Mathieu,

Yes! Using servermanager.Fetch() worked for both “calc” and the original “frameinfo”!

Thank you!

Followup: any chance you can give a one or two sentence explanation for what that does / why that’s necessary?

```
Thanks again!
Bill
```

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [September 23, 2021, 2:52pm UTC](https://discourse.paraview.org/t/how-to-access-row-data-in-python/8059/4 "2021-09-23T14:52:42Z")

</div>

Hi Bill,

The scripting layer you are working with accesses the ParaView layer of data management. That’s what takes care of setting up pipelines and coordinating them across client and any existing server processes. The actual data is available on the server side only by default. To access it in the scripting environment in which you are working, you need to explicitly bring over a copy onto the client side, which is what `servermanager.Fetch` does. Once you have copied the data over, then you can work with it.

---

<div class="post-metadata">

### Author: ![wsherman](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8797f3/32.png) [@wsherman](https://discourse.paraview.org/u/wsherman)
#### Post date: [September 23, 2021, 3:12pm UTC](https://discourse.paraview.org/t/how-to-access-row-data-in-python/8059/5 "2021-09-23T15:12:51Z")

</div>

Awesome, thanks for the explanation Cory!  
Bill

---

<div class="post-metadata">

### Author: ![Markhan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/markhan/32/10593_2.png) [@Markhan](https://discourse.paraview.org/u/Markhan)
#### Post date: [December 18, 2022, 10:16am UTC](https://discourse.paraview.org/t/how-to-access-row-data-in-python/8059/6 "2022-12-18T10:16:12Z")

</div>

Hello Sherman,

I still haven’t firgured out how to assess Row Data in programmable Filter, can you give one example?

Thanks again!

---

<div class="post-metadata">

### Author: ![PattiM1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/d2c977/32.png) [@PattiM1](https://discourse.paraview.org/u/PattiM1)
#### Post date: [December 18, 2022, 4:34pm UTC](https://discourse.paraview.org/t/how-to-access-row-data-in-python/8059/7 "2022-12-18T16:34:13Z")

</div>

I also need to know this - that is, to get PV-displayed, multiblock data out of ParaView and into Python as a flat array. Have you tried the Python interface package “[paraview](https://kitware.github.io/paraview-docs/latest/python/)?” One of the problems I’m having simply outputting data from ParaView is that it gives data files (CSV) listed in block format, and also doesn’t seem to output the correct number of points, even when requesting [cell-center data](https://discourse.paraview.org/t/add-the-cell-center-coordinates-to-the-cell-data/560/7). My simulation is 48 x 126 = 6,048 cells, but ParaView always puts out 12,283 data points, even when requesting cell center data - so that’s confusing.

Has anyone tried the Python package “[paraview](https://kitware.github.io/paraview-docs/latest/python/)?” Does it work for extracting data? I think this package can also access data slices that OP needs…

---

<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: [December 19, 2022, 9:41am UTC](https://discourse.paraview.org/t/how-to-access-row-data-in-python/8059/8 "2022-12-19T09:41:18Z")

</div>

> [@Markhan](#):
>
> Row Data in programmable Filter, can you give one example?

`inputs[0].RowData`

> Have you tried the Python interface package “[paraview](https://kitware.github.io/paraview-docs/latest/python/)?”

Unrelated, this is about programmable filter, not pvpython.

---

<div class="post-metadata">

### Author: ![PattiM1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/d2c977/32.png) [@PattiM1](https://discourse.paraview.org/u/PattiM1)
#### Post date: [December 20, 2022, 4:35pm UTC](https://discourse.paraview.org/t/how-to-access-row-data-in-python/8059/9 "2022-12-20T16:35:14Z")

</div>

Thanks for the reply! The package “paraview” has a steep learning curve as it’s intended to fully control Paraview. I found a package “[openfoamparser](https://pypi.org/project/openfoamparser/)” which reads all the OF output files in the correct formats into data arrays.
