doc: comments
This commit is contained in:
parent
15937bdd64
commit
0fd756be6f
@ -8,18 +8,22 @@ class CSV_handler:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.working_dir = str(Path.cwd())
|
self.working_dir = str(Path.cwd())
|
||||||
|
|
||||||
|
# Makes dataframe from the csv files in the working directory
|
||||||
def make_df(self, filename)
|
def make_df(self, filename)
|
||||||
filepath = self.working_dir + str(filename)
|
filepath = self.working_dir + str(filename)
|
||||||
df = pd.read_csv(filepath)
|
df = pd.read_csv(filepath)
|
||||||
return df
|
return df
|
||||||
|
|
||||||
|
# Extracts out the timestamp and the selected emg signal into a new dataframe
|
||||||
def get_time_emg_table(self, filename, emg_nr):
|
def get_time_emg_table(self, filename, emg_nr):
|
||||||
|
|
||||||
tot_data_frame = make_df(self, filename)
|
tot_data_frame = make_df(self, filename)
|
||||||
emg_str = "emg" + str(emg_nr)
|
emg_str = "emg" + str(emg_nr)
|
||||||
filtered_df = tot_data_frame[emg_str]
|
filtered_df = tot_data_frame[["timestamp", emg_str]]
|
||||||
return filtered_df
|
return filtered_df
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user