Chihiro
Excel Ninja
Woot!
They've added Preview feature integrating Python into PowerBi.
https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-august-2018-feature-summary/#python
Very simple sample script.
Result:
![upload_2018-8-16_15-6-29.png upload_2018-8-16_15-6-29.png](https://chandoo.org/forum/data/attachments/54/54543-a26203d0110d521d664293204d47915f.jpg)
You can also use it in Query Editor and Visuals.
![upload_2018-8-16_15-10-13.png upload_2018-8-16_15-10-13.png](https://chandoo.org/forum/data/attachments/54/54545-521c885da6b13e144188ded9634c98d6.jpg)
They've added Preview feature integrating Python into PowerBi.
https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-august-2018-feature-summary/#python
Very simple sample script.
Code:
import numpy as np
import pandas as pd
data = np.array([['','Col1','Col2'],
['Row1',1,2],
['Row2',3,4]])
df = pd.DataFrame(data=data[1:,1:],
index=data[1:,0],
columns=data[0,1:])
Result:
![upload_2018-8-16_15-6-29.png upload_2018-8-16_15-6-29.png](https://chandoo.org/forum/data/attachments/54/54543-a26203d0110d521d664293204d47915f.jpg)
You can also use it in Query Editor and Visuals.
![upload_2018-8-16_15-10-13.png upload_2018-8-16_15-10-13.png](https://chandoo.org/forum/data/attachments/54/54545-521c885da6b13e144188ded9634c98d6.jpg)