The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.