Below is the numpy array. I need to perform two operations on this array.
- Add one column with value [column 1] - [column 3].
- Add another column with value [column 1] - [previous value of column1].
I can do this using normal list operations, but is it possible to use numpy or pandas? If so, how can it be done?
Input data:
[['78' '3412' '98' '3441']
['106' '3412' '127' '3434']
['139' '3411' '160' '3434']
['170' '3411' '191' '3442']
]