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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
OfirKe
Frequent Visitor

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
OfirKe
Frequent Visitor

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 @OfirKe ,

 

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.

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 @OfirKe ,

 

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 @OfirKe ,

 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors