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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
cool_333
Frequent Visitor

Python script / integration with power bi

Hi All,

 

I have imported 3 libraries Seaborn, Pandas & from Scipy.test import ttest _rel to calculate P & R values. I have 2 columns x & y.

Below script works fine in jupyter notebook however can you please help me what should be script for Power Bi 

Import Pandas as pd,

Import seaborn as sns,

from Scipy. stats import  ttest _rel

pvalue = ttest_rel(df.x,df.y)

pvalue = 1.8489

 

Many Thanks

1 REPLY 1
ams1
Super User
Super User

Ho @cool_333 


I'm not in front of the PC, but:


When you open the script editor I think it mentions in a comment the name of the variable you have to use for the DataFrame - you have to use that exact variable name.

 

If you want to return something, add it as a column to the dataframe.

 

Please mark this as answer if it helped.

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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