Uploaded April 2025 | Updated December 2026, 3 hours ago
I'll show you how to use Python in Excel on a CSV file without loading the data into your workbook.
π₯ Download the files I use in the video: xelplus.com/python-in-excel-external-data/#download
π Learn Python in Excel with real business examples in my Python in Excel for the Real World course: xelplus.com/course/python-in-excel (500,000+ enrolled in our courses)
I connect to the file with Power Query as a connection only, then reference it in Python with xl(). From there I use describe() and corr() to find patterns in an HR survey, turn them into a Seaborn heatmap, and use lmplot to back up a recommendation. When the source file changes, one refresh updates everything.
β Good to know
Power Query is the only way to bring external data into Python in Excel. Functions like pandas.read_csv don't work there.
Python in Excel runs in the Microsoft cloud, so you need an internet connection.
Python in Excel is available for Microsoft 365 Business and Enterprise users on Windows, Mac and the web. Family and Personal users have it in preview.
Importing external data with Power Query for Python doesn't work in Excel for the web. Use the desktop app.
β±οΈ Chapters
00:00 Python in Excel with external data
00:18 The common mistake: loading the data into Excel
01:43 Connect to a CSV without loading it
02:20 Preview the data with xl() in Python
03:18 Summary stats with describe()
04:18 Find patterns with corr()
05:10 Visualize correlations with a Seaborn heatmap
06:30 Add correlation labels (annot=True)
07:09 Back a recommendation with lmplot
08:23 Refresh when the source data changes
09:16 Connect to another Excel workbook the same way
π¬ Introducing Python in Excel: youtu.be/FbBXtqtRnWU
π Clean your data first in my Power Query course: xelplus.com/course/excel-power-query
β‘οΈ Join this channel to get access to perks: youtube.com/channel/UCJtUOos_MwJa_Ewii-R3cJA/join
βοΈ Get one practical Excel tip every week in our free newsletter, Between the Sheets: link.xelplus.com/yt-d-newsletter
π© Connect with us:
Instagram: instagram.com/lgharani
LinkedIn: linkedin.com/in/leilagharani
#excel #python #pythoninexcel
I'll show you how to use Python in Excel on a CSV file without loading the data into your workbook.
π₯ Download the files I use in the video: xelplus.com/python-in-excel-external-data/#download
π Learn Python in Excel with real business examples in my Python in Excel for the Real World course: xelplus.com/course/python-in-excel (500,000+ enrolled in our courses)
I connect to the file with Power Query as a connection only, then reference it in Python with xl(). From there I use describe() and corr() to find patterns in an HR survey, turn them into a Seaborn heatmap, and use lmplot to back up a recommendation. When the source file changes, one refresh updates everything.
β Good to know
Power Query is the only way to bring external data into Python in Excel. Functions like pandas.read_csv don't work there.
Python in Excel runs in the Microsoft cloud, so you need an internet connection.
Python in Excel is available for Microsoft 365 Business and Enterprise users on Windows, Mac and the web. Family and Personal users have it in preview.
Importing external data with Power Query for Python doesn't work in Excel for the web. Use the desktop app.
β±οΈ Chapters
00:00 Python in Excel with external data
00:18 The common mistake: loading the data into Excel
01:43 Connect to a CSV without loading it
02:20 Preview the data with xl() in Python
03:18 Summary stats with describe()
04:18 Find patterns with corr()
05:10 Visualize correlations with a Seaborn heatmap
06:30 Add correlation labels (annot=True)
07:09 Back a recommendation with lmplot
08:23 Refresh when the source data changes
09:16 Connect to another Excel workbook the same way
π¬ Introducing Python in Excel: youtu.be/FbBXtqtRnWU
π Clean your data first in my Power Query course: xelplus.com/course/excel-power-query
β‘οΈ Join this channel to get access to perks: youtube.com/channel/UCJtUOos_MwJa_Ewii-R3cJA/join
βοΈ Get one practical Excel tip every week in our free newsletter, Between the Sheets: link.xelplus.com/yt-d-newsletter
π© Connect with us:
Instagram: instagram.com/lgharani
LinkedIn: linkedin.com/in/leilagharani
#excel #python #pythoninexcel










