BEST solutions || MySQL || Pandas 1-liner || Beats 100% !!
\n# Code\n\n# Write your MySQL query statement below\nSELECT product_id, \'store1\' AS store, store1 AS price \nFROM Products \nWHERE store1 IS NOT NULL\nUNION 
\n# Code\n```\n# Write your MySQL query statement below\nSELECT product_id, \'store1\' AS store, store1 AS price \nFROM Products \nWHERE store1 IS NOT NULL\nUNION \nSELECT product_id, \'store2\' AS store, store2 AS price \nFROM Products \nWHERE store2 IS NOT NULL\nUNION \nSELECT product_id, \'store3\' AS store, store3 AS price \nFROM Products \nWHERE store3 IS NOT NULL\n```\n```\nimport pandas as pd\n\ndef rearrange_products_table(products: pd.DataFrame) -> pd.DataFrame:\n    return pd.melt(products, id_vars=\'product_id\', var_name=\'store\', value_name=\'price\').dropna()\n```
['MySQL', 'Pandas']