# Problem for creating a raw object

**URL:** <https://mne.discourse.group/t/problem-for-creating-a-raw-object/1713>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [January 14, 2019, 2:59pm UTC](https://mne.discourse.group/t/problem-for-creating-a-raw-object/1713 "2019-01-14T14:59:07Z")\
**Posts on this page:** 2\
**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:** [January 14, 2019, 2:59pm UTC](https://mne.discourse.group/t/problem-for-creating-a-raw-object/1713/1 "2019-01-14T14:59:07Z")

</div>

External Email - Use Caution

In MNE is to possible to create a raw object with one sensor data. Means I  
have 30sec epochs single channel EEG data in the .csv file. For further  
analysis on MNE, I try to convert that file to MNE understandable formate  
with the help of following code

# loading 30-sec epoch single channel EEG data  
mydataset=pd.read\_csv("EEG\_30sec.csv")  
[rc, cc]=mydataset.shape; #output is 1, 3000  
data =mydataset.iloc[1,:].values #converting in to NP array

# Initialize an info structure  
info = mne.create\_info(  
&nbsp;&nbsp;&nbsp;&nbsp;ch\_names=['EEG1'],  
&nbsp;&nbsp;&nbsp;&nbsp;ch\_types=['eeg'],  
&nbsp;&nbsp;&nbsp;&nbsp;sfreq=100  
)  
custom\_raw = mne.io.RawArray(data, info)  
print(custom\_raw)

I am getting the following error message.  
raise ValueError('Data must be a 2D array of shape (n\_channels, '  
ValueError: Data must be a 2D array of shape (n\_channels, n\_samples

---

<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:** [January 14, 2019, 4:15pm UTC](https://mne.discourse.group/t/problem-for-creating-a-raw-object/1713/2 "2019-01-14T16:15:10Z")

</div>

External Email - Use Caution

Hi,

Just make sure your variable "data" is 2D. You can use something like  
data[None, :] if it's 1D.

Best,  
Mainak
