Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Python while loop in power query version above 3.9.0

Hi everyone I have a case i really can t understand:

my python code in power query uses a while loop as below:

while i < len(XXX):

 

This works fine in python version 3.9.0 but not in 3.9.4 ???

 

Any one had the same issue or better a solution of this issue (apart from  downgradding to 3.9.0)

 

tks in advance

3 REPLIES 3
rohit1991
Super User
Super User

The issue is likely due to differences in the Python environment or library versions. Solutions:

  1. Check Python Path: Ensure Power Query uses the correct Python path in Options > Python Scripting.
  2. Verify Library Behavior: Check for changes in libraries (e.g., Pandas, NumPy) between Python 3.9.0 and 3.9.4.
  3. Debug in Power Query: Test the script directly in Power Query to identify specific compatibility issues.
Akash_Varuna
Resolver II
Resolver II

Could you elaborate the error what you are getting 

You replied to 2 years old post 🙂


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.