This is probably a basic question, so my apologies if it has been asked before, I have searched extensively and not been able to find an answer.
I am reading records in protobuf format, and trying to come up with a script that will write to csv. The proto file has lots of optional messages, followed by a value. I want to be able to write the value to a corresponding column.
Eg
A , B , C , D , E , F , G , H
columns
The proto messages will be a stream of random values matched to a column heading.
ie (A,1) (B,4), (H,2), (F,3)
(much more complicated, but this will do for an example). When i receive a message, i want to be able to locate the correct column, and place the value directly into it.
Note: I am writing this for others to use, so would prefer not to use Panda's for simplicity's sake. There are hundreds of columns, so is there anyway to place the value directly into a column without searching through all columns each time using == to find the corresponding one? Ie something along the lines of :
write value 3 to column F