# Read .csv/.RDS files with MNE

**URL:** <https://mne.discourse.group/t/read-csv-rds-files-with-mne/2140>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [April 7, 2020, 9:30am UTC](https://mne.discourse.group/t/read-csv-rds-files-with-mne/2140 "2020-04-07T09:30:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 7, 2020, 9:30am UTC](https://mne.discourse.group/t/read-csv-rds-files-with-mne/2140/1 "2020-04-07T09:30:35Z")

</div>

External Email - Use Caution

Hi,

My name is Daniel and I'm currently working on my thesis for the Master  
Cognitive Science and Artificial Intelligence for Tilburg University in the  
Netherlands. I want to create a model that can differentiate between  
patients vs non-patients for a particular disorder, based on EEG data.

However, my input data is in the format of a .csv file or alternatively  
multiple .RDS files. I've been researching for the past couple of days how  
I can have MNE read these files, but I can't seem to figure it out.

Does anyone have a suggestion on what the best way of going about this  
problem is? Any help would be much appreciated.

Thanks in advance!

Daniel  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20200407/c0b78f77/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200407/c0b78f77/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 7, 2020, 2:02pm UTC](https://mne.discourse.group/t/read-csv-rds-files-with-mne/2140/2 "2020-04-07T14:02:35Z")

</div>

External Email - Use Caution

Hi!

You can try to read the CSV file with pandas (pd.read\_csv) and then construct an MNE raw object using mne.io.RawArray (assuming that you have continuous EEG data). For a short summary how to do that see [https://mne.tools/stable/auto\_examples/io/plot\_objects\_from\_arrays.html](https://mne.tools/stable/auto_examples/io/plot_objects_from_arrays.html).

Clemens

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 7, 2020, 2:05pm UTC](https://mne.discourse.group/t/read-csv-rds-files-with-mne/2140/3 "2020-04-07T14:05:22Z")

</div>

External Email - Use Caution

Use pandas or numpy to read them and convert them to NumPy arrays and  
then use EpochsArray, RawArray, etc. to construct the appropriate MNE  
objects.

Since you have things in R format -- are you using eeguana? Its  
developer, Bruno, is in Tilburg....

Phillip
