0

I am having the data as the picture.

Question: How can I extract the product and price as columns and calculate the price for each product?

enter image description here

I already using regex to extract the product and quantity but stuck in the next step.

enter image description here

  • 1
    Please see [How to make good reproducible pandas examples](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples). Screenshots of data and code are not useful. – BigBen Oct 13 '20 at 15:01
  • are you only given sums and you want to find out individual prices from that? If that's the case - you would need to solve it as a set of linear equations - something like sympy - https://docs.sympy.org/latest/modules/solvers/solvers.html – avloss Oct 13 '20 at 17:29
  • @avloss, thank you so much. Thanks guys, I tried with sympy and received a great outcome – chien le Oct 14 '20 at 12:17

0 Answers0