'how do i read log file and make second line as columns name

i have the following data in the log (TXT) file: " 14/12/2021 20:11 HPF: 0x0 TIMING: 0x40MEASURE: 0x2POWER_CTL: 0xF X (g) Y (g) Z (g)
0.500 -0.500 -2.500
0.500 -0.200 -2.500
" i would like to read it in to datafram and use the secound line ( X (g), Y (g), Z(g) ) as the columns.

any suggestions ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source