cancel
Showing results for 
Search instead for 
Did you mean: 
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

 

v-kkf-msft
Community Support
Community Support

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.

v-kkf-msft
Community Support
Community Support

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors