From 89d6bdc907269d03902340e8cf268d0b0a280224 Mon Sep 17 00:00:00 2001 From: glopesdev Date: Mon, 21 Oct 2024 08:52:45 +0100 Subject: [PATCH] Add support for exporting EEG data as dataframe --- pluma/stream/eeg.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pluma/stream/eeg.py b/pluma/stream/eeg.py index 7a1e7d7..de6979b 100644 --- a/pluma/stream/eeg.py +++ b/pluma/stream/eeg.py @@ -54,5 +54,8 @@ def add_clock_offset(self, offset): self.server_lsl_marker["Seconds"] += offset self.data.np_time += offset + def to_frame(self): + return pd.DataFrame(data=self.data.np_eeg, index=self.data.np_time) + def __str__(self): return f"EEG stream from device {self.device}, stream {self.streamlabel}"