Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello I made a power bi project but during this project I used 2 python scripts; the problem is that I discovered after that standard gateway does not support python so I have to change these 2 scripts or convert them i really need your support
first script Python :
# 'dataset' holds the input data for this script
import pandas as pd
DX= pd.DataFrame(dataset.loc[:,])
AAA = []
for i in range(0, len(DX)):
if(DX['stock initial'][i] > 0):
var = DX['CONSO'][i]
AAA.append(var)
else:
var = var + DX['CONSO'][i]
AAA.append(var)
DX['cumul Consommation']=AAA
result :
second script python
# 'dataset' holds the input data for this script
import pandas as pd
DX= pd.DataFrame(dataset.loc[:,])
AAA = []
for i in range(0, len(DX)):
if(DX['stock initial'][i] > 0):
var = DX['stock initial'][i] + DX['Livr_prevue'][i]-DX['CONSO'][i]
AAA.append(var)
else:
var = var + DX['Livr_prevue'][i]-DX['CONSO'][i]
AAA.append(var)
DX['stock Final']=AAA
result :
thnks for ur support
You can replace these scripts with List.Accumulate() .
Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |