cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper II

## print function in python to collect the variables in power bi

Hi Team,

I am trying to the print the mean median mode , skewness and kurtosis using python in power bi

when i use print in the py script editor it throws error.. please advice best way to summariaze data like below

print("Mean : %f\nMedian : %f"%(Loop_Time.mean(),Loop_Time.median()))
print("Variance : %f\nStandar Deviation: %f"%(Loop_Time.var(),Loop_Time.std()))
print("Skewness : %f"%(Loop_Time.skew()))
print("Kurtosis : %f"%(Loop_Time.kurtosis()))

#Finding min,max,1st,3rd quartile and median
print("Min :%f"%(Loop_Time.min()))
print("1st Quartile :%f"%(Loop_Time.quantile(0.25)))
print("Meidan :%f"%(Loop_Time.median()))
print("3rd Quartile :%f"%(Loop_Time.quantile(0.75)))
print("Max :%f"%(Loop_Time.max()))

1 ACCEPTED SOLUTION
Helper II

Team i found a workarround for this...

Here is the example how i did it in script editor

import matplotlib.patheffects as path_effects
import pandas as pandas
import matplotlib.pyplot as plt

Loop_Time=dataset.Loop_Time

a='Mean :'+str(round(Loop_Time.mean(),3))
b='variance :'+str(round(Loop_Time.var(),3))

text = plt.text(0.5, 0.5,a,fontsize=20)
text1 = plt.text(0.5, 0.4,b,fontsize=20)
plt.axis('off')
plt.show()

Helper II

Team i found a workarround for this...

Here is the example how i did it in script editor

import matplotlib.patheffects as path_effects
import pandas as pandas
import matplotlib.pyplot as plt

Loop_Time=dataset.Loop_Time

a='Mean :'+str(round(Loop_Time.mean(),3))
b='variance :'+str(round(Loop_Time.var(),3))

text = plt.text(0.5, 0.5,a,fontsize=20)
text1 = plt.text(0.5, 0.4,b,fontsize=20)
plt.axis('off')
plt.show()

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.