1

I'm working with streamlit and EEG data. So I'm using mne library to process the edf files.

The thing is that to visualize into streamlit I would like to convert my data.info into a pandas dataframe.

type(data.info) ---> <class 'mne.io.meas_info.Info'>

Anyone knows how can I do this? Thanks!

mnsosa
  • 71
  • 4
  • 2
    Try to ask this in the official [github](https://github.com/mne-tools/mne-python) page. – ferdy Aug 27 '22 at 07:21

1 Answers1

1

You likely want to turn the signal data array into a dataframe, not the .info attribute, that holds information about channel position, sampling frequency or measurement date. The channel data are stored as a numpy array in ._data attribute of the Raw object, but the preferred way to access it is using .get_data() method.

However, if you just want to turn the channel data to a dataframe - Raw and Epochs objects have .to_dataframe() method.

Visualising the EEG signal is also easy with mne-python, you can do data.plot() for example. Before visualising the data you may also want to filter the signal, in such case you can use data.filter() method (specifying filter edges as arguments).

mmagnuski
  • 1,249
  • 1
  • 11
  • 23
  • This might have something useable in conjunction with that `.to_dataframe()` method: ['Convert group MNE EEG data to pandas DataFrame and compute mean amplitudes over time windows'](https://gist.github.com/aaronjnewman/1a957666ae626e103bce8286ae324001). – Wayne Sep 08 '22 at 21:07