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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

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
Responsive Resident
Responsive Resident

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.