Python will be in Excel

Oh joy.

Since its inception, Microsoft Excel has changed how people organize, analyze, and visualize their data, providing a basis for decision-making for the millions of people who use it each day. Today we’re announcing a significant evolution in the analytical capabilities available within Excel by releasing a Public Preview of Python in Excel. Python in Excel makes it possible to natively combine Python and Excel analytics within the same workbook - with no setup required. With Python in Excel, you can type Python directly into a cell, the Python calculations run in the Microsoft Cloud, and your results are returned to the worksheet, including plots and visualizations.

What sets Python in Excel apart?

1. Python in Excel is built for analysts.

Every day millions of users around the world rely on familiar Excel tools such as formulas, charts, and PivotTables to analyze and understand their data. Starting today, Python in Excel will also be natively integrated directly into the Excel grid. To get started simply use the new PY function which allows you to input Python code directly into Excel cells.


Excel users now have access to powerful analytics via Python for visualizations, cleaning data, machine learning, predictive analytics, and more. Users can now create end to end solutions that seamlessly combine Excel and Python – all within Excel. Using Excel’s built-in connectors and Power Query, users can easily bring external data into Python in Excel workflows. Python in Excel is compatible with the tools users already know and love, such as formulas, PivotTables, and Excel charts.

Here are some examples of the types of analysis that are now possible with Python in Excel:

Advanced Visualizations

Tap into the potential of well-known Python charting libraries like Matplotlib and seaborn to create a wide variety of charts, spanning from conventional bar graphs and line plots to specialized visualizations such as heatmaps, violin plots, and swarm plots.

2. Python in Excel exposes the best of Python analytics via Anaconda.

Anaconda is a leading enterprise Python repository used by tens of millions of data practitioners worldwide. Python in Excel leverages Anaconda Distribution for Python running in Azure, which includes the most popular Python libraries (e.g. pandas, Matplotlib, scikit-learn, etc.), and is securely built, tested, and supported by Anaconda. Python provided by Anaconda supports a wide array of analytics with Python in Excel.

thumbnail image 6 of blog post titled                                                                            Announcing Python in Excel: Combining the power of Python and the flexibility of Excel.

"I am thrilled to announce the integration of Anaconda Distribution for Python into Microsoft Excel – a major breakthrough that will transform the workflow of millions of Excel users around the world.” said Anaconda CEO and co-founder Peter Wang.

3. Python in Excel runs securely on the Microsoft Cloud, with no setup required.

Python code used by Excel runs on the Microsoft Cloud with enterprise-level security as a compliant Microsoft 365 connected experience. The Python code runs in its own hypervisor isolated container using Azure Container Instances and secure, source-built packages from Anaconda through a secure software supply chain. Python in Excel keeps your data private by preventing the Python code from knowing who you are, and opening workbooks from the internet in further isolation within their own separate containers. Data from your workbooks can only be sent via the built-in xl() Python function, and the output of the Python code can only be returned as the result of the =PY() Excel function.

Learn more about our Data Security

4. Python in Excel is built for teams.

Users can share Python in Excel workbooks with confidence. Teammates can seamlessly interact with and refresh Python in Excel based analytics without needing to worry about installing additional tools, Python runtimes, or managing libraries and dependencies. Users can share workbooks using their favorite collaboration tools such as Microsoft Teams and Microsoft Outlook and work together seamlessly via comments, @ mentions, and co-authoring with colleagues as they normally would in Excel. Sensitivity labels applied to your workbooks containing Python will keep them compliant with your organization’s information protection policies.

My anaconda don’t want none unless you’re in excel hun

14 Likes

So, it’ll roll out to my work machines in 10 years or so?

(I’m still waiting to be able to use XLOOKUP…)

Oh well; “Learn Python” may have just been bumped up on my personal project list.

Are we still doing comment of the year award?

1 Like

dude.

you do actually have to update Excel every so often

I agree, but sadly my company’s IT department takes a much more conservative approach.

Generally we don’t get upgrades of mission-critical software until shortly before the approved version goes out-of-support.

I did just check again, and I was shocked to see that I can now use XLOOKUP on my work laptop, but I still can’t on the server where I do most of my real work.

I suspect the upgrade on my laptop is a function of whatever changes were needed to roll Teams out at the start of pandemic lockdowns, and keep it updated, whereas my server has a much more limited Office installation.

I’ve got Office 2019. No XLOOKUP. I wouldn’t consider it to be that old.

Okay, look.

When I’ve had to finally collapse and buy a smartphone (last week), I’m just saying that expecting that we’ve moved onto where Excel gets updated monthly is kind of the expectation for many of us.

Though the hardware hasn’t kept up – I have been strongly hinting I need a gaming setup so I can have the computing power I actually need to do what I need to do at work.

So evidently XLOOKUP became standard in 2020. I did have to look it up (tee hee) to see when it was deployed – 2019 for the “insiders” and 2020 for the rest of us schmoes.

I used to take perverse joy in ensuring that my home PC had better specs than my work PC.

That changed when I moved into my current role. My main PC is now a Windows server with a terrabyte of RAM, and a high end Xeon processor…and that feels rather excessive.

But at least my home PC has a better video card.

My home PC is much better than my work PC, but that mainly just makes me sad because I spend so much more time on my work PC.

2 Likes

Anyone think it will be well implemented? Or is it going to be like LaTeX in word, which can “convert” simple LaTeX code, just so long as you don’t care about the subtle details of spacing / fraction sizing / accent widths.

I’m assuming it will be implemented half-assedly, which is how they generally do things.

I’m expecting some sort of proprietary variant of Python that will be similar…but different enough to be problematic.