Serdar Yegulalp
Senior Writer

Microsoft adds Python support to Power BI

news
Aug 22, 20182 mins
Data ScienceData VisualizationPython

A preview feature allows Python scripts to be used as data sources and as a way to create visualizations in Power BI Desktop

stats big data stocks analytics
Credit: Thinkstock

Power BI, Microsoft’s business analytics and data reporting suite, now integrates with the Python programming language by way of a feature preview in the August 2018 release of Power BI.

As described in a blog post summarizing the release, Python scripts may be run directly inside the Power BI Desktop application, and can be leveraged for “data cleansing, analysis, and visualization.” 

By selecting “Python” in the “Get Data” dialog, the user can paste a Python script into a supplied window and use a script’s dataframe output as a source. Python scripting can also be used to create visuals in a report. The visuals update automatically whenever data changes, although “the visual itself is not interactive.”

Microsoft has also supplied a demo Power BI file with working examples of popular Python packages used to create visualizations and transformations for a sample data set. Included examples feature the Seaborn and Altair visual plotting libraries; Scikit-learn, a popular library for machine learning tasks; FlashText, a regex-like seach-and-replace system; and PyFlux/Pendulum for date and time parsing.

Power BI has long integrated with R, another popular language for data manipulation and analytics. But while R has remained a niche language, Python has enjoyed wide adoption in both data science circles and the general programming population, thanks to its broad selection of third-party packages that handle nearly every conceivable data-handling need.

Microsoft may also be considering Python integration with its Excel spreadsheet product, based on a user survey about Excel that circulated late last year. However, no official announcement has been made yet. Microsoft emphasized after the conclusion of the survey that this was “an area of exploration for us, without any specific timeline.”

Other additions to Power BI this time around include a long-awaited print-to-PDF feature for reports, and a data connector for Apache Spark clusters. Many of the updates for Power BI Desktop are slated to show up in a future release of Power BI Report Server, a version of which is due in late August 2018.

Serdar Yegulalp

Serdar Yegulalp is a senior writer at InfoWorld. A veteran technology journalist, Serdar has been writing about computers, operating systems, databases, programming, and other information technology topics for 30 years. Before joining InfoWorld in 2013, Serdar wrote for Windows Magazine, InformationWeek, Byte, and a slew of other publications. At InfoWorld, Serdar has covered software development, devops, containerization, machine learning, and artificial intelligence, winning several B2B journalism awards including a 2024 Neal Award and a 2025 Azbee Award for best instructional content and best how-to article, respectively. He currently focuses on software development tools and technologies and major programming languages including Python, Rust, Go, Zig, and Wasm. Tune into his weekly Dev with Serdar videos for programming tips and techniques and close looks at programming libraries and tools.

More from this author