diff --git a/src/g5505_file_reader.py b/src/g5505_file_reader.py index 6f8ad28..d0f4b17 100644 --- a/src/g5505_file_reader.py +++ b/src/g5505_file_reader.py @@ -106,15 +106,6 @@ def dataframe_to_np_structured_array(df: pd.DataFrame): # Convert the DataFrame to a structured array structured_array = np.array(list(df.itertuples(index=False, name=None)), dtype=dtype) - #return structured_array - #table_header = df.columns - #table = df.to_numpy() - - #rows,cols = table.shape - #tmp = [tuple(table[i,:]) for i in range(rows)] - #dtype_tmp = [(table_header[i],'f4') for i in range(cols)] - #data = np.array(tmp, dtype=dtype_tmp) - return structured_array def read_txt_files_as_dict(filename : str ): @@ -210,7 +201,7 @@ def read_txt_files_as_dict(filename : str ): df_categorical_attrs['timestamps'] = df_categorical_attrs[timestamp_variables].astype(str).agg(' '.join, axis=1) df_categorical_attrs = df_categorical_attrs.drop(columns = timestamp_variables) - #print(df_categorical_attrs) + categorical_variables = [item for item in df_categorical_attrs.columns]