This simple programming task made me spent couple of days trying to implement in ds, to no avail
If I have this data:
Code: Select all
col1 col2
id1 5
id2 0
id3 0
id4 0
id5 0
I'd lke to output to become just one row, where col2 is the last non zero value read.
Code: Select all
col1 col2
row 5
Code: Select all
col1 col2
id1 5
id2 0
id3 5
id4 0
id5 5
To think that I still need to hurdle the joining the data into one row.
Any ideas how to solve the above problems?
TIA!