I have a df with certain column values that I want to split and then copy into new rows. For example:
Order# Price Quantity
123 $20 5
456,789 $50 7
321 $45 3
121,651 $76 9
Some rows in the "order#" column contain two order numbers separated by a column. I want each order# to have its own row. For example, I want the second row (456, 789) to be split by the column delimeter into two rows. The final result would look like:
Order# Price Quantity
123 $20 5
456 $50 7
789 $50 7
321 $45 3
121 $76 9
651 $76 9
I tried doing something like:
df['Order Column'].str.split(",", expand=True)
but then got stuck. Appreciate any input.