Skip to content

Commit 4e3ed5b

Browse files
committed
Sync LeetCode submission Runtime - 620 ms (27.63%), Memory - 61.1 MB (100.00%)
1 parent 140947e commit 4e3ed5b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import pandas as pd
2+
3+
def rearrange_products_table(products: pd.DataFrame) -> pd.DataFrame:
4+
df = products.melt(id_vars='product_id', var_name='store', value_name='price')
5+
df = df.dropna(axis=0)
6+
return df

0 commit comments

Comments
 (0)