I want to create a table(dataframe) by using some live data fields which will be updating in some fixed time and as soon as data updates I need to add that data into my table I get data in tabular format like below
Time col1 col2 col3
timestapm1 123 456 789
timestamp2 7584 4547 6545
timestamp3 8974 1241 2140
When script run for first time then it create new seprate list of column names for my desired table by using above data which looks like below
Timestamp col1_456 col1_4547 col1_1241 col3_456 col3_4547 col3_1241
col1 and col3 values changes regularly, col2 is static . I'm just getting confused at how can I match the column names of new table and add value under that column.
Time col1 col2 col3
timestapm4 17823 456 10789
timestamp5 758404 4547 65045
timestamp6 89744 1241 14140
Desired output
Timestamp col1_456 col1_4547 col1_1241 col3_456 col3_4547 col3_1241
timestamp4 17823 758404 89744 10789 65045 14140
Please help, thanks!