4

I have a pandas DataFrame like this:

name,category,price
Apple, phone, 120,140,300
Samsung, phone, 200
Sony, TV, 600
Nokia, phone, 99,80

And I want to get the next pandas DataFrame

name,category,price
Apple, phone, 120
Apple, phone, 140
Apple, phone, 300
Samsung, phone, 200
Sony, TV, 600
Nokia, phone, 99
Nokia, phone, 80

What is the best way create such dataframe, especially if it consists of 1 million products? Thank you in advance.

Chris
  • 29,127
  • 3
  • 28
  • 51
Alex Cold
  • 63
  • 7

0 Answers0