March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello, I am pretty new on power Bi and Python, I am trying to use a scrip to read around 300 excel files and append or concat them but once those file have been appended, 99% of the time I wont need to read them again so just in case I did a scrip with a check box that let me decide if I want or not to read again all historical data, It works on anaconda notebook but when I try to run it in Power BI I got
Details: "ADO.NET: Python script error.
<pi>NameError: name 'display' is not defined
</pi>"
The Script :
import ipywidgets as widgets
import os
import pandas as pd
import glob
path_data=r'C:\Users\xxxxx\Desktop\All'
check=widgets.Checkbox(value=False,
description='Refresh Historic Data',
disabled=False,
indent=False)
display(check)
if check.value ==False:
path_data=r'C:\Users\m0188842\Desktop\All\1'
elif check.value ==True:
path_data=r'C:\Users\m0188842\Desktop\All'
os.chdir(path_data)
filenames = glob.glob('*.xlsm*')
df_final = pd.DataFrame()
for file in filenames:
df = pd.read_excel(file, sheet_name='Consolidation')
df_final=pd.concat([df,df_final],ignore_index=True)
df_final.to_csv(os.path.join(path_data, 'Test1.csv'), index=False)
The question is Can I sue widgets on Power Bi?
Thank you!
Solved! Go to Solution.
You can only use the default renderer. No other renderers are permitted.
If you run this in Power Query then there is no renderer at all. Comment out that line. You cannot have any UI during the Power Query part.
You can only use the default renderer. No other renderers are permitted.
If you run this in Power Query then there is no renderer at all. Comment out that line. You cannot have any UI during the Power Query part.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
90 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |