Resolved: How do i group product data with multiple of the same products per store

In this post, we will see how to resolve How do i group product data with multiple of the same products per store

Question:

I’m building a pyhon price tracker which allows me to enter some urls. The program then fetches their prices once each day and adds it to the csv file below.
I’m now looking for a way to show the price evolution of each product with a line chart but cannot find a way to get something like this below where i have prices from a product from a specific store.
csv dataset

Best Answer:

I think you need itertools.groupby and some string handling like this

I have used google lens to extract text from image so it may be incorrect


Output


For File base

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com