I have multiple files to be imported which would each contain a set of data:
a1,10
a2,20
a3,20
b1,100
b2,100
a1,100
a2,10
a3,100
b1,30
b2,100
I'm trying to get them into the format:
a1,10,100,...
a2,20,10,...
a3,20,100,...
b1,100,30,...
b2,100,100,...
I will have 100s of files which I'd like to concatenate lines together. My first thought was to create an array, cycle through each file to capture the relevant percentage into the array for each ID and then output each array at the end and in PHP I could do this fairly easily with a
if(!isset($$ArrayName)) {
$$ArrayName = array();
}
array_push($$ArrayName, $Plant);
With python I can't find an obvious equivalent any suggestions
Thanks Richard