Uploaded June 2025 | Updated December 2026, 3 hours ago
3 Python in Excel hacks: fix messy dates, unpivot columns to rows and spot patterns fast.
π₯ Download the practice files: xelplus.com/python-in-excel-tricks/?utm_source=yt-video&utm_medium=vid-description&utm_campaign=download-python-hacks&utm_content=python-in-excel-tricks#download
π Python in Excel for the Real World: xelplus.com/course/python-in-excel/?utm_source=yt-video&utm_medium=vid-description&utm_campaign=python-in-excel&utm_content=python-in-excel-tricks (500,000+ enrolled in our courses)
I show you three tasks that used to take me hours, each done in under a minute with Python in Excel. Fix dates that formatting and the YEAR function can't handle, unpivot columns into rows with pandas melt, and build a seaborn swarm plot to spot patterns.
You don't need to be a programmer. If you can write an IF function in Excel, you can do this.
β Good to know:
Python in Excel needs a Microsoft 365 subscription and an internet connection. Python runs in the Microsoft Cloud.
Update: Python in Excel is now available for Microsoft 365 Business and Enterprise on Windows, Mac and the web. Family and Personal users have it in preview.
Dates like 03/04 can be read the wrong way round. For day-month dates, add dayfirst=True inside pd.to_datetime().
β±οΈ Chapters:
00:00 3 Python in Excel hacks
00:25 Messy dates that formatting and YEAR can't fix
01:29 Fix messy dates with pd.to_datetime
02:39 Unpivot columns to rows with pd.melt
03:58 Rename the unpivoted columns
04:32 Make the unpivot dynamic (dropna and reset_index)
05:58 Spot patterns in your data
06:41 Build a swarm plot with seaborn
07:36 Compare groups with hue
π¬ Related videos:
π¬ Introducing Python in Excel: youtu.be/FbBXtqtRnWU
π¬ Python in Excel with external data: youtu.be/ije_fF8SWcw
π¬ Unpivot data with Power Query: youtu.be/JMrfbv2h7p8
β‘οΈ Join this channel: youtube.com/channel/UCJtUOos_MwJa_Ewii-R3cJA/join
π Get one practical Excel tip each week in our newsletter: link.xelplus.com/yt-d-newsletter
π© Connect with us:
Instagram: instagram.com/lgharani
LinkedIn: linkedin.com/in/leilagharani
#excel #python #pythoninexcel
3 Python in Excel hacks: fix messy dates, unpivot columns to rows and spot patterns fast.
π₯ Download the practice files: xelplus.com/python-in-excel-tricks/?utm_source=yt-video&utm_medium=vid-description&utm_campaign=download-python-hacks&utm_content=python-in-excel-tricks#download
π Python in Excel for the Real World: xelplus.com/course/python-in-excel/?utm_source=yt-video&utm_medium=vid-description&utm_campaign=python-in-excel&utm_content=python-in-excel-tricks (500,000+ enrolled in our courses)
I show you three tasks that used to take me hours, each done in under a minute with Python in Excel. Fix dates that formatting and the YEAR function can't handle, unpivot columns into rows with pandas melt, and build a seaborn swarm plot to spot patterns.
You don't need to be a programmer. If you can write an IF function in Excel, you can do this.
β Good to know:
Python in Excel needs a Microsoft 365 subscription and an internet connection. Python runs in the Microsoft Cloud.
Update: Python in Excel is now available for Microsoft 365 Business and Enterprise on Windows, Mac and the web. Family and Personal users have it in preview.
Dates like 03/04 can be read the wrong way round. For day-month dates, add dayfirst=True inside pd.to_datetime().
β±οΈ Chapters:
00:00 3 Python in Excel hacks
00:25 Messy dates that formatting and YEAR can't fix
01:29 Fix messy dates with pd.to_datetime
02:39 Unpivot columns to rows with pd.melt
03:58 Rename the unpivoted columns
04:32 Make the unpivot dynamic (dropna and reset_index)
05:58 Spot patterns in your data
06:41 Build a swarm plot with seaborn
07:36 Compare groups with hue
π¬ Related videos:
π¬ Introducing Python in Excel: youtu.be/FbBXtqtRnWU
π¬ Python in Excel with external data: youtu.be/ije_fF8SWcw
π¬ Unpivot data with Power Query: youtu.be/JMrfbv2h7p8
β‘οΈ Join this channel: youtube.com/channel/UCJtUOos_MwJa_Ewii-R3cJA/join
π Get one practical Excel tip each week in our newsletter: link.xelplus.com/yt-d-newsletter
π© Connect with us:
Instagram: instagram.com/lgharani
LinkedIn: linkedin.com/in/leilagharani
#excel #python #pythoninexcel


![The Excel Timeline chart youll actually keep using (free template included)
Build a dynamic timeline chart in Excel that updates when your dates change.
π₯ Download the free timeline template: https://www.xelplus.com/excel-timeline-chart/?utm_source=yt-video&utm_medium=vid-description&utm_campaign=download-charts&utm_content=timeline#download-section
π 500,000+ enrolled in our courses. Build a whole library of clean business charts in Business Charts in Excel π https://www.xelplus.com/course/business-excel-charts/?utm_source=yt-video&utm_medium=vid-description&utm_campaign=business-charts&utm_content=timeline
No add-ins and no VBA. Put your dates and milestones in an Excel table, add a helper column, and turn a line chart with markers into a timeline with vertical error bars. Data labels show the date and milestone on separate lines. Change a date, add a row or delete one, and the timeline updates.
A short formula staggers the labels above and below the axis so they dont overlap. To always start the pattern on the first row of the table, wherever it sits:
=CHOOSE(MOD(ROW()-ROW(TableTime[#Headers])-1,4)+1,10,-10,12,-30)
00:00 A dynamic timeline chart in Excel
00:29 Set up the data as an Excel table
00:46 Add a helper column for chart levels
01:17 Insert a line chart with markers
01:39 Add vertical error bars (Minus, No Cap, 100%)
02:15 Style the error bars and markers
02:53 Why the labels need different heights
03:41 Stagger labels with CHOOSE, MOD and ROW
04:47 Fix the axis start and end dates
05:13 Remove tick marks and axis labels
05:35 Style the axis with arrows
06:10 Add data labels: date and milestone
06:55 Put the date on a new line
07:42 Highlight an important milestone
08:13 Change a date and the timeline follows
08:37 Change the label pattern
08:53 Start the pattern on the tables first row
π¬ McKinsey chart in Excel: https://youtu.be/-Pi68IkutaQ
π¬ Make Excel charts like The Economist: https://youtu.be/wP8NWRR0Fdg
β‘οΈ Join this channel to get access to perks: https://www.youtube.com/channel/UCJtUOos_MwJa_Ewii-R3cJA/join
βοΈ Get one practical Excel tip every week in our free newsletter, Between the Sheets: https://link.xelplus.com/yt-d-newsletter
π© Connect with us:
Instagram: https://www.instagram.com/lgharani
LinkedIn: https://www.linkedin.com/in/leilagharani
#excel #excelcharts #exceltips The Excel Timeline chart youll actually keep using (free template included)](https://i.ytimg.com/vi/GP1W4fKWUrA/mqdefault.jpg)







