From 15937bdd64ee1f6100f576387d72b9a2e87da4fc Mon Sep 17 00:00:00 2001 From: Skudalen Date: Tue, 22 Jun 2021 20:54:42 +0200 Subject: [PATCH] feat: func to extract the selected table with emg nr, get_time_emg_table() --- Handle_emg_data.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Handle_emg_data.py b/Handle_emg_data.py index 522cd27..a2e18c9 100644 --- a/Handle_emg_data.py +++ b/Handle_emg_data.py @@ -5,16 +5,20 @@ class CSV_handler: self.working_dir - def __init__(): + def __init__(self): self.working_dir = str(Path.cwd()) def make_df(self, filename) filepath = self.working_dir + str(filename) df = pd.read_csv(filepath) return df + + def get_time_emg_table(self, filename, emg_nr): - def get_time_emg_table(filepaths, subject_nr): - return None + tot_data_frame = make_df(self, filename) + emg_str = "emg" + str(emg_nr) + filtered_df = tot_data_frame[emg_str] + return filtered_df