Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe'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
I use python visual but I use script as below , Ii error.
import numpy as np
import matplotlib.pyplot as plt
dataset = pandas.DataFrame(% Developing(In month), % Developing(Last Month), code and name process)
y = dataset.code and name process
x1 = dataset.% Developing(Last Month)
x2 = dataset.% Developing(In month)
b=plt.barh(y, x1,align="center",color="#66c2a5",label="% Developing(Last Month)")
b2=plt.barh(y, x2,align="center",left=x1,color="#8da0cb",label="% Developing(In month)")
for rect in b:
w = rect.get_width()
plt.text(w-0.05, rect.get_y()+rect.get_height()/2, '{:.0%}'.format(w), ha='left', va='center',fontsize=20)
plt.xticks([0.05, 0.5,0.9, 1],['$on process$', '$continue$', '$On the way$','$Completed$'])
plt.grid(axis="x", which="major",linestyle='-.')
plt.title('custom')
plt.xlabel('xlabel name')
plt.ylabel('ylabel name')
plt.legend()
plt.show()
Guide me about it please.
Hi @Anonymous
What are the other bits in the DataFrame call : and name process ?
The structure of the call to DataFrame doesn't match the documentation.
regards
Phil
Proud to be a Super User!
Hi @Anonymous
Your call to pandas.DataFrame doesn't look right
pandas.DataFrame(% Developing(In month), % Developing(Last Month), code and name process)
Refer to pandas.DataFrame — pandas 1.2.3 documentation (pydata.org)
What is code and name process? It looks like you are trying to pass multiple arguments but I suspect that's not actually what you intend.
What is % Developing(Last Month) meant to be? The index?
Did you test this script in Python outside PBI?
Although PBI allows spaces and special chars like % in names, it's best to avoid using them when you have to deal with other environments.
Regards
Phil
Proud to be a Super User!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 34 | |
| 32 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 38 | |
| 35 | |
| 25 |