# SaveData from descriptive statistics exports an empty csv file

**URL:** https://discourse.paraview.org/t/savedata-from-descriptive-statistics-exports-an-empty-csv-file/14426
**Category:** ParaView Support
**Created:** [April 18, 2024, 9:18am UTC](https://discourse.paraview.org/t/savedata-from-descriptive-statistics-exports-an-empty-csv-file/14426 "2024-04-18T09:18:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Trophime](https://discourse.paraview.org/user_avatar/discourse.paraview.org/trophime/32/966_2.png) [@Trophime](https://discourse.paraview.org/u/Trophime)
#### Post date: [April 18, 2024, 9:18am UTC](https://discourse.paraview.org/t/savedata-from-descriptive-statistics-exports-an-empty-csv-file/14426/1 "2024-04-18T09:18:39Z")

</div>

Hi,  
I’m trying to export the result from Descriptive Statistics as a csv file.  
I’ve tried to do it in a python script and in GUI mode:

```auto
# create a new 'Descriptive Statistics'
descriptiveStatistics1 = DescriptiveStatistics(registrationName='DescriptiveStatistics1', Input=exportcase,
    ModelInput=None)
descriptiveStatistics1.VariablesofInterest = ['thermo_electric.electric.electric_potential', 'thermo_electric.heat.temperature']

# Create a new 'SpreadSheet View'
spreadSheetView1 = CreateView('SpreadSheetView')
spreadSheetView1.ColumnToSort = ''
spreadSheetView1.BlockSize = 1024

# show data in view
descriptiveStatistics1Display = Show(descriptiveStatistics1, spreadSheetView1, 'SpreadSheetRepresentation')

# get layout
layout1 = GetLayoutByName("Layout #1")

# add view to a layout so it's visible in UI
AssignViewToLayout(view=spreadSheetView1, layout=layout1, hint=0)

# update the view to ensure updated data information
spreadSheetView1.Update()

# set active source
SetActiveSource(descriptiveStatistics1)

# save data
SaveData('D:/hybride-Bh26.5T-Bb9T-Bs8.5T_HPfixed_BPfixed/bmap/np_32/thermo-electric.exports/stats.csv', proxy=descriptiveStatistics1, RowDataArrays=['Cardinality', 'Kurtosis', 'M2', 'M3', 'M4', 'Maximum', 'Mean', 'Minimum', 'Skewness',
'Standard Deviation', 'Sum', 'Variable', 'Variance'],
    Precision=7,
    UseScientificNotation=1,
    FieldAssociation='Row Data')

```

The csv file created is always empty.  
The only work around is to save the content of the SpreadSheetView.

Setup: paraview 5.11 both on Windows and Debian 12 (with package from debian)

Can you confirm this behaviour?  
Do I miss some steps to save the stats in a csv?

Best  
C

---

<div class="post-metadata">

### Author: ![RaniaYian](https://discourse.paraview.org/user_avatar/discourse.paraview.org/raniayian/32/13936_2.png) [@RaniaYian](https://discourse.paraview.org/u/RaniaYian)
#### Post date: [March 26, 2025, 9:00am UTC](https://discourse.paraview.org/t/savedata-from-descriptive-statistics-exports-an-empty-csv-file/14426/2 "2025-03-26T09:00:08Z")

</div>

I have the same problem too, with version 5.13.
