# Save outcome to CSV file, multiple datasets

**URL:** <https://discourse.slicer.org/t/save-outcome-to-csv-file-multiple-datasets/23009>\
**Category:** Support\
**Tags:** python\
**Created:** [April 19, 2022, 6:34am UTC](https://discourse.slicer.org/t/save-outcome-to-csv-file-multiple-datasets/23009 "2022-04-19T06:34:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hanne1234](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hanne1234/32/14755_2.png) [@Hanne1234](https://discourse.slicer.org/u/Hanne1234)\
**Post date:** [April 19, 2022, 6:34am UTC](https://discourse.slicer.org/t/save-outcome-to-csv-file-multiple-datasets/23009/1 "2022-04-19T06:34:14Z")

</div>

For my research I want to extract the features of 40 different VOIs. Most ideally, I would like to save the outcome of the features automatically into a csv file. For 1 VOI this is no problem. But my question is, is it possible to save the new outcome to the same csv file everytime the code is runned?  
So that I only have to change the name of the VOI, run the code 40 times and end up with 1 csv file with all the outcomes?

Thank you!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 28, 2022, 2:59am UTC](https://discourse.slicer.org/t/save-outcome-to-csv-file-multiple-datasets/23009/2 "2022-06-28T02:59:05Z")

</div>

You can automate all the steps that you do in the Slicer GUI using Python scripting. The [Slicer Script Repository](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html) and [Developer Tutorials](https://slicer.readthedocs.io/en/latest/developer_guide/api.html#tutorials) page are good starting points.
