application_vnd.jupyter.stderr_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

stimulus=pd.read_excel("/kaggle/input/young-adults-affective-data-ecg-and-gsr-signals/ECG_GSR_Emotions/Stimulus_Description.xlsx")
stimulus["Target Emotion"]=stimulus["Target Emotion"].str.title()
stimulus.info()
stimulus.head()

ecg_data = pd.read_excel('/kaggle/input/young-adults-affective-data-ecg-and-gsr-signals/ECG_GSR_Emotions/Self-Annotation Labels/Self-annotation Single Modal_Use.xlsx')
ecg_data['filename'] = 'ECGdata_s' + ecg_data['Session Id'].astype(str) + 'p' + ecg_data['Participant Id'].astype(str) + 'v' + ecg_data['Video Id'].astype(str) + '.dat'
PATH_2 = '/kaggle/input/young-adults-affective-data-ecg-and-gsr-signals/ECG_GSR_Emotions/Raw Data/Single Modal/ECG/'
ecg_data['ECG_list'] = ecg_data['filename'].apply(lambda x: list(pd.read_table(PATH_2 + x, sep=',')))
ecg_data = ecg_data.merge(stimulus.iloc[:, 0:3], left_on=['Session Id', 'Video Id'], right_on=['Session ID', 'Video ID'], how='left')
ecg_data.to_csv('ecg_data.csv', index=False)

ecg_data = pd.read_csv('/kaggle/working/ecg_data.csv')
ecg.data.info()
ecg_data.head()