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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
johnerlandsson
Regular Visitor

Edit Python query

I use a python query to fetch data from several text files. Whenever I need to edit the script I have to remove the query and add it again, pasting the code in the input box. If I right click my query and select "advanced editor" the script is flattened to a single row and difficult to edit.

Is there a way of opening the script in an IDLE editor?

3 REPLIES 3
v-xicai
Community Support
Community Support

Hi @johnerlandsson ,

 

You can launch your external Python IDE from Power BI Desktop and have your data automatically imported and displayed in the Python IDE.

 

For references:

https://docs.microsoft.com/en-us/power-bi/desktop-python-ide,

https://docs.microsoft.com/en-us/power-bi/desktop-python-visuals .

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thanks @v-xicai!

But I think that solution is for editing python visuals. Not for editing python as a data source. Or am I missing something?

If the problem is actual for you, please try following steps:
1) Transform data

2) Please right click  on dataname and select advanced editor

3) Edit you source code and click Done. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.