I am new to Python. I would like to do the difference between two rows of a csv file when they have the same id. This csv dataset is built from an sql table export which has more than 3 millions rows.
This is an example on how my timeserie's dataset looks like :
DATE - Product ID - PRICE
26/08 - 1 - 4
26/08 - 2 - 3
27/08 - 1 - 5
27/08 - 2 - 3
For instance I would like to calculate the difference between the price of the product with id 1 on the 26/08 and the price of this same product on the next day (27/08) to estimate the price's variation over time. I wondered what could be the best way to manipulate and do calculation over these datas in Python to do my calculations, whether with Python's csv module or with SQL queries in the code. I also heard of Pandas library... Thanks for your help !