Dec-29-2021, 11:03 AM
I need to manage multiple data organized like as following:
SLOT1
| timestamp | value1 | value2 | value3 | value4 |
|-----------|--------|--------|--------|--------|
| xxxxxxxxx | aaaaaa | bbbbbb | cccccc | dddddd |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| xxxxxxxxx | qqqqqq | rrrrrr | ssssss | tttttt |
SLOT2
| timestamp | value1 | value2 | value3 | value4 |
|-----------|--------|--------|--------|--------|
| xxxxxxxxx | aaaaaa | bbbbbb | cccccc | dddddd |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| xxxxxxxxx | qqqqqq | rrrrrr | ssssss | tttttt |
SLOT 'n'
| timestamp | value1 | value2 | value3 | value4 |
|-----------|--------|--------|--------|--------|
| xxxxxxxxx | aaaaaa | bbbbbb | cccccc | dddddd |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| xxxxxxxxx | qqqqqq | rrrrrr | ssssss | tttttt |
The data structure should not be a Pandas Dataframe but preferibly a native structure without the use of external libraries.
Each single Slot should have a fixed length and new coming data (let say a new row) should be treated with the FIFO logic. so the last coming data sould be appended at the end and the first one should be extracted mainteining fixed the total length of the data structure.
Last but not the least, I need to add an extra column to each slot to perform a kind of computation like
"columnadded" = ("value1" + "value2") / ("value3" + "value4")
thank you for all will help me on this
SLOT1
| timestamp | value1 | value2 | value3 | value4 |
|-----------|--------|--------|--------|--------|
| xxxxxxxxx | aaaaaa | bbbbbb | cccccc | dddddd |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| xxxxxxxxx | qqqqqq | rrrrrr | ssssss | tttttt |
SLOT2
| timestamp | value1 | value2 | value3 | value4 |
|-----------|--------|--------|--------|--------|
| xxxxxxxxx | aaaaaa | bbbbbb | cccccc | dddddd |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| xxxxxxxxx | qqqqqq | rrrrrr | ssssss | tttttt |
SLOT 'n'
| timestamp | value1 | value2 | value3 | value4 |
|-----------|--------|--------|--------|--------|
| xxxxxxxxx | aaaaaa | bbbbbb | cccccc | dddddd |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| ......... | ...... | ...... | ...... | ...... |
| xxxxxxxxx | qqqqqq | rrrrrr | ssssss | tttttt |
The data structure should not be a Pandas Dataframe but preferibly a native structure without the use of external libraries.
Each single Slot should have a fixed length and new coming data (let say a new row) should be treated with the FIFO logic. so the last coming data sould be appended at the end and the first one should be extracted mainteining fixed the total length of the data structure.
Last but not the least, I need to add an extra column to each slot to perform a kind of computation like
"columnadded" = ("value1" + "value2") / ("value3" + "value4")
thank you for all will help me on this