I am building a CNN model, and I have to analyze its training history per epoch. Epoch history looks like this. This history is saved on a .txt file.
Epoch 1/300
11/11 [==============================] - 4s 182ms/step - loss: 8.3641 - accuracy: 0.1382 - f1_m: 0.0676 - precision_m: 0.2398 - recall_m: 0.0408 - lr: 1.0000e-04 - val_loss: 8.6183 - val_accuracy: 0.0952 - val_f1_m: 0.0630 - val_precision_m: 0.1872 - val_recall_m: 0.0379 - val_lr: 1.0000e-04
Epoch 2/300
11/11 [==============================] - 1s 129ms/step - loss: 6.1399 - accuracy: 0.5581 - f1_m: 0.5011 - precision_m: 0.7591 - recall_m: 0.3781 - lr: 1.0000e-04 - val_loss: 6.6084 - val_accuracy: 0.4230 - val_f1_m: 0.1302 - val_precision_m: 0.6426 - val_recall_m: 0.0725 - val_lr: 1.0000e-04
.
.
Epoch 300/300
11/11 [==============================] - 1s 132ms/step - loss: 0.7877 - accuracy: 0.9913 - f1_m: 0.9911 - precision_m: 0.9928 - recall_m: 0.9894 - lr: 1.0000e-04 - val_loss: 1.7068 - val_accuracy: 0.8314 - val_f1_m: 0.8347 - val_precision_m: 0.8433 - val_recall_m: 0.8263 - val_lr: 1.0000e-04
To analyze epoch history, I need to populate those datas to a table. In Python, I think it is a good idea to use DataFrame. Also, at the end of DataFrame, I also want to count the average value per column. For illustration, I want the DataFrame to look like this image below: (I make this using Ms. Excel)

What I want to ask is:
- How to do substring on
.txtfile to take all datas for DataFramecolumn? As far as I know, DataFrame needscolumnsbefore it can take a data, and I currently do not know how to get it from my.txtfile. - If question number 1 is possible to do, how to store the values inside a Python variable, then populate it inside a DataFrame?