dh2 = DataHandler() print('CREATED datahandlerS') # header = 0 because the csv has the first row indicating column names, let pandas # know that the first row is a header row dh1.load_dataframe_from_csv( input_directory_path='/app/data/temp/testSNTAtle.7z/testSNTAtle/', filename='P1_atle_B_TEMP_SYNCHED_BT.csv', header=0, columns=[ 'timestamp', 'back_x', 'back_y', 'back_z', 'thigh_x', 'thigh_y', 'thigh_z', 'btemp', 'ttemp' ]) dh1.convert_column_from_str_to_datetime(column_name='timestamp') dh1.set_column_as_index("timestamp") ############################## dh2.load_dataframe_from_csv( input_directory_path='/app/data/temp/testVegar.7z/testVegar/', filename='P1_vegar_B_TEMP_SYNCHED_BT.csv', header=0, columns=[ 'timestamp', 'back_x', 'back_y', 'back_z', 'thigh_x', 'thigh_y', 'thigh_z', 'btemp', 'ttemp' ]) dh2.convert_column_from_str_to_datetime(column_name='timestamp') dh2.set_column_as_index("timestamp")
# ########## dh = DataHandler() sub_name = data_name.split(".")[0] input_dir = "../data/temp/xxx_x.7z/xxx_x/" filename = "xxx_xB_xxx_x_T_timesync_output_TEMP_BT.csv" dh.load_dataframe_from_csv( input_directory_path=input_dir, filename=filename, header=0, columns=['time', 'bx', 'by', 'bz', 'tx', 'ty', 'tz', 'btemp', 'ttemp']) dh.convert_column_from_str_to_datetime(column_name='time') dh.set_column_as_index("time") # # add labels dh.add_new_column("label") intervals = dh.read_labels_from_json( filepath="../data/temp/xxx_x.7z/xxx_x/xxx_x intervals.json") dh.add_labels_file_based_on_intervals(intervals=intervals) df = dh.get_dataframe_iterator() print(df.head(10)) print() print(df.dtypes) # # ######## # # # # DATA INPUT FORMAT SPECIFIC DONE # #