Excel now lets you use Python natively for streamlined data analysis

A Microsoft Excel spreadsheet showing graphs and organized data alongside Python code
(Image credit: Microsoft)

Microsoft has announced new integrations for Python within Excel, with the aim of streamlining data analysis and empowering a wider range of workers.

Once active, users will be able to access the popular programming language through a new ‘PY’ function that can be accessed within Excel, without any need for add-ons.

This can be used to manipulate data within a workbook, produce advanced visualizations, or train sophisticated machine learning (ML) models. Users will also be able to bring external data into their Excel workbook using Power Query.

Could this be a boon for cryptocurrency miners?

Python code on a screen

(Image credit: Getty Images)

Has Microsoft learned nothing from the Azure Pipelines fiasco?


Giving Excel users the power to natively combine Python and Excel analytics in the same workbook is a good idea. 


But it doesn’t take a huge leap of the imagination to spot the potential for abuse by cryptocurrency miners.

Continue reading

Data teams may already have a workflow that involves manipulating data using Python, and then moving this into Excel for user-friendly and shareable visualizations. By combining the two, Microsoft could cut out unnecessary work to streamline the process.

The firm also announced that workbooks that utilize Python analytics can be freely shared among co-workers, and workers can access up-to-date analysis from a workbook even if they don’t have Python in Excel activated for their accounts.

It could be used in this way to widen access to data analysis results within a team, circumventing any bottlenecks a data science team may encounter at present when it comes to translating Python data into digestible workbooks for non-technical colleagues.

An Excel spreadsheet showing the option to add Python code directly to a cell

(Image credit: Microsoft)

A key selling point of Python is its relative ease of use compared to other programming languages. It is also known as a powerful tool for manipulating large amounts of data and creating visualizations. Visual Basic for Applications (VBA), which is typically used to automate tasks within Microsoft apps, lacks the finesse of Python when it comes to data analysis.

RELATED RESOURCE

Whitepaper from ServiceNow covering ways automated processes can drive revenue and growth across banking, with image of three smiling colleagues

(Image credit: ServiceNow)

Learn how you can automate processes across your bank to drive revenue and growth.

DOWNLOAD FOR FREE

Python also has many tens of thousands of libraries, which can be easily called to produce powerful functions, and this will partly carry over to Python in Excel.

Microsoft partnered with Anaconda, a popular provider of Python repositories used for data science, to run its data science and machine learning (ML) specific Anaconda Distribution in Azure.

It is through Anaconda that Python in Excel accesses some of the most commonly-used Python libraries including ‘pandas’ for data analysis, ‘seaborn’ and ‘Matplotlib’ for advanced data visualization, and statsmodels for statistical modeling.

Developers and data scientists who make use of more niche, open-source Python libraries that are not immediately available through Anaconda may struggle to perform their duties through the service.

Rory Bathgate
Features and Multimedia Editor

Rory Bathgate is Features and Multimedia Editor at ITPro, overseeing all in-depth content and case studies. He can also be found co-hosting the ITPro Podcast with Jane McCallion, swapping a keyboard for a microphone to discuss the latest learnings with thought leaders from across the tech sector.

In his free time, Rory enjoys photography, video editing, and good science fiction. After graduating from the University of Kent with a BA in English and American Literature, Rory undertook an MA in Eighteenth-Century Studies at King’s College London. He joined ITPro in 2022 as a graduate, following four years in student journalism. You can contact Rory at rory.bathgate@futurenet.com or on LinkedIn.