I have a dataframe with 60 columns, which most of them are just information about other sold products, it looks like this:
store_id|seller_id | product_0_code |product_0_value |product_1_code |product_1_value
----------------------------------------------------------------------------------
12 | 1234 | a2356 | 52,20 | ae822, | 50,20
In order to reduce the number of columns, I've been trying to put the values from the columns in rows, something like this:
store_id |seller_id | product_ code |product_value
12 | 1234 | a2356 | 52,20
12 | 1234 | ae822 | 50,20
That means, keeping the values of store_id and seller_id, but taking the values from the products_code and product_value columns and inserting them in new rows.