Matlab or python code for Vertical and Horizontal Displacement

I have desc and asc .csv files for the same area. I create this files in matlab with stamps.

Do you know any matlab or python code for Vertical and Horizontal Displacement?