I want to get the data from some columns and create new rows with it. In my case, the same product was can be sold many times, and each time it was sold again, my df created a new column, I’d like to take the data from those columns and put them in rows, keeping the same "prevenda" field.
It looks like this:
and I’d to look like this:
ID Product Value 0 A 1,20 1 A 3,30 2 B 5,50 3 B 4,30 4 B 450 5 B 6,30 6 C 9,30 0 a 2 1 b 9 2 c 4 3 d 2
Keeping the same ID. but putting the values from the coloumns in others rows.
Source: Python-3x Questions