✅ Pandas Simple & Easy Solution | Beginner Friendly 🔥💯
\uD83D\uDD3C IF YOU FIND THIS POST HELPFUL PLEASE UPVOTE \uD83D\uDC4D\n\nimport pandas as pd\n\ndef rearrange_products_table(products: pd.DataFrame) -> pd.DataF
**\uD83D\uDD3C IF YOU FIND THIS POST HELPFUL PLEASE UPVOTE \uD83D\uDC4D**\n```\nimport pandas as pd\n\ndef rearrange_products_table(products: pd.DataFrame) -> pd.DataFrame:\n    result_rows = []\n    \n    for idx, row in products.iterrows():\n        product_id = row[\'product_id\']\n        \n        for store in [\'store1\', \'store2\', \'store3\']:\n            price = row[store]\n            \n            if pd.notna(price):\n                result_rows.append((product_id, store, price))\n                \n    result_df = pd.DataFrame(result_rows, columns=[\'product_id\', \'store\', \'price\'])\n    \n    return result_df\n```\n**Thank you for reading! \uD83D\uDE04 Comment if you have any questions or feedback.**
['Python', 'Python3']