What’s new in Python for Excel

Posted by

Microsoft just announced Python in Excel. Here’s how it’ll change the way Python and Excel analysts work.

Well, Microsoft just announced Python in Excel.

As Microsoft said, this is a significant evolution in the analytical capabilities available within Excel. They want to combine the power of Python with the flexibility of Excel. The best of both worlds!

With this integration, you can write Python code in Excel cells, create advanced visualizations using libraries such as matplotlib and seaborn, and even apply machine learning techniques using libraries like scikit-learn and statsmodels.

Python in Excel will definitely open a series of new possibilities in a spreadsheet. This will change the way both Python and Excel analysts work. Here’s how.

Excel analysts will have to learn to code

Excel is probably the most popular tool for data analysis because of its usability and flexibility.

Excel users don’t need to know how to code to clean data or create visualizations and macros. With a couple of formulas and some clicks, we can wrangle data and create pivot tables and charts in Excel.

Excel alone was great for doing basic data analysis, but its limitations didn’t allow data analysts to do complex data transformations and create advanced visualizations (let alone apply machine learning techniques). In contrast, programming languages like Python can handle complex computations.

Now Excel analysts will need to learn Python to future-proof their career.

But will they adapt? Well, the closest most Excel users have been to a programming language was Visual Basic for Applications (VBA), but even those who write VBA code don’t call themselves “programmers.” That’s why most Excel users saw learning to code as something either complex or unnecessary (why learn to code when you could get a pivot table with one click?)

Hopefully, Excel analysts will adapt. The good news for them is that Python is an easy language to learn. Excel users won’t even need to install Python on their computers and download a code editor to start writing Python code. In fact, there’s a new PY function in Excel that allows users to write Python code in an Excel cell.

Source: Microsoft Blog

Amazing, isn’t it? Now we can write Python code in a cell to get a dataframe, and visualizations inside our worksheet.

This is definitely an evolution in the analytical capabilities in Excel.

Python libraries for data analysis will be available in Excel. This will benefit both Python and Excel analysts

Now it’s possible to use powerful Python libraries such as pandas, seaborn, and scikit-learn in an Excel workbook. These libraries will help us do advanced analytics, create amazing visualizations, and apply machine learning, predictive analytics, and forecasting techniques in Excel.

Excel analysts who can’t write Python code will have to settle for pivot tables, formulas, and Excel charts, but those who adapt will take their analytical skills to the next level.

Here are some examples of how doing data analysis will look with Python in Excel.

With Python in Excel, we’ll be able to use regular expressions (regex) to locate specific strings or patterns of text in cells. In the example below, a regex is used to extract dates from text.

Source: Microsoft Blog

Advanced visualizations such as heatmaps, violin maps, and swarm plots are now possible in Excel with Seaborn. Here’s the typical pair plot we’d create with Seaborn, but now displayed in an Excel worksheet.

Source: Microsoft Blog

Last, but not least, now you can use machine learning models like a DecisionTreeClassifier in an Excel worksheet and fit the model using pandas dataframes.

Python in Excel will bridge the gap between Python and Excel analysts

The days when Python and Excel analysts had problems working together will be over when Python in Excel is available to all users.

Excel analysts will need to adapt to these new changes not only to have Python as a new skill in their curriculum but to future-proof their careers. Learning VBA won’t be as relevant for Excel analysts as learning Python libraries such as Pandas and Numpy.

Python calculations will be run in the Microsoft Cloud, so even analysts running computers with limited resources will experience faster processing for complex computations.

On the other hand, Python analysts will be able to collaborate more easily with Excel analysts, bridging the gap between them.

Python in Excel will definitely change the way both Python and Excel analysts approach data analysis in the future. After this announcement, I expect the number of Excel analysts who will start learning Python to grow.

In case you’re an Excel user who wants to learn Python from scratch, I recommend you to check out my free YouTube course below.

Python in Excel is currently available to users running Beta Channel on Windows. To have access you have to join the Microsoft 365 Insider Program. For more information, read here.

Leave a Reply

Your email address will not be published. Required fields are marked *