Uploaded July 2026 | Updated September 2026, 2 hours ago
Start with Python Foundations: courses.xelplus.com/l/pdp/python-in-excel-foundations (apply coupon YTPY for 60% off for a limited time)
Need to turn month columns into rows in Excel?
Do not restructure the data manually. Use Python in Excel and the pandas melt function to unpivot the entire table in seconds.
In this example, we keep Region, Country, and Channel, then convert the monthly columns into two clean fields: Month and Sales.
The result is dynamic too. Add another month to the Excel Table and the output updates automatically.
Power Query can do this as well, but this method takes just one formula.
Topics covered:
- Excel columns to rows
- Unpivot data in Excel
- Python in Excel
- Pandas melt
- Wide to long data transformation
500,000+ people have taken our courses so far. If you want to go deeper: π link.xelplus.com/yt-d-all-courses
π¨ Subscribe to "Between the Sheets" newsletter to stay on top of office tips and Excel hacks: link.xelplus.com/yt-d-newsletter
π Join this channel to get access to perks:
youtube.com/channel/UCJtUOos_MwJa_Ewii-R3cJA/join
π² Letβs connect on social:
Instagram: instagram.com/lgharani
LinkedIn: linkedin.com/in/leilagharani
#Excel #PythonInExcel #ExcelTips
Start with Python Foundations: courses.xelplus.com/l/pdp/python-in-excel-foundations (apply coupon YTPY for 60% off for a limited time)
Need to turn month columns into rows in Excel?
Do not restructure the data manually. Use Python in Excel and the pandas melt function to unpivot the entire table in seconds.
In this example, we keep Region, Country, and Channel, then convert the monthly columns into two clean fields: Month and Sales.
The result is dynamic too. Add another month to the Excel Table and the output updates automatically.
Power Query can do this as well, but this method takes just one formula.
Topics covered:
- Excel columns to rows
- Unpivot data in Excel
- Python in Excel
- Pandas melt
- Wide to long data transformation
500,000+ people have taken our courses so far. If you want to go deeper: π link.xelplus.com/yt-d-all-courses
π¨ Subscribe to "Between the Sheets" newsletter to stay on top of office tips and Excel hacks: link.xelplus.com/yt-d-newsletter
π Join this channel to get access to perks:
youtube.com/channel/UCJtUOos_MwJa_Ewii-R3cJA/join
π² Letβs connect on social:
Instagram: instagram.com/lgharani
LinkedIn: linkedin.com/in/leilagharani
#Excel #PythonInExcel #ExcelTips










