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

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

Reply
Anonymous
Not applicable

dataframe not generated automatically by fields I select

Hi,

Using the python script editor, when I drag fields to the Values field, the script is not updating and staying as it is:

 

# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:

# = pandas.DataFrame()
# = .drop_duplicates()

# Paste or type your script code here:
 
I'm expecting the script to update automatically to:
# dataset= pandas.DataFrame(age,type_part) 
# dataset= dataset.drop_duplicates()
 
any idea how to fix it?
5 REPLIES 5
Anonymous
Not applicable

Hi,

The version is 2.96.701.0 64-bit

OfirKe_0-1630056175406.png

the python IDE is pycharm.

 

Here's what's happening when adding values (python script not generating the dataframe automaticaly)

OfirKe_1-1630056789203.png

 

Hi @Anonymous ,

 

Please install required Python packages, see if it works.

 

pip install pandas

pip install matplotlib

 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

Anonymous
Not applicable

Hi, the packages already installed and I managed to do visualizations, but the problem still not solved as the data-frame not generating automatically as mentioned above.

Hi @Anonymous ,

 

Please download and install the latest version 2.96.1061.0 , and see if it works.

 

Best Regards,
Winniz

v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

When I add a Python visual in Power BI Desktop and drag fields to the Values, the script can update. Which version of Desktop are you using? Do you have Python locally installed and the correct Python installation path specified in the Desktop option?

 

vkkfmsft_0-1630041640437.png

vkkfmsft_1-1630042385648.pngvkkfmsft_2-1630042414617.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors