I'm doing my first steps with Python3, so I'm not sure how to solve the following task. I'd like to count how often each bit in a numpy array changes over the time, my array looks like this:
first column: timestamp; second column: ID; third to last column: byte8,...,byte2, byte1, byte0 (8 bit per byte)
[[0.009469 144 '00001001' ... '10011000' '00000000' '00000000']
[0.01947 144 '00001000' ... '10011000' '00000000' '00000001']
[0.029468 144 '00001001' ... '10011000' '00000000' '00000011']
...
[0.015825 1428 '11000000' ... '01101101' '00000000' '00000001']
[0.115823 1428 '11000000' ... '01101100' '00000000' '00000000']
[0.063492 1680 '01000000' ... '00000000' '00000000' '00000000']]
The task is to count the bit changes for every ID over the time. The result should look like this (timestamp could be ignored):
one row for every ID containing:
first column: ID; second to column #65 (number of changes bit64, number of changes bit63, ... number of changes bit1, number of changes bit0)
So in this short example, there should a result array with 3 rows (ID144, ID1428 and ID1680) and 65 columns.
Do you know how to achieve this?