Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
lws
New Member

How to allow python visual to access folder

Hi everyone, I'm facing problem to run my python script in PowerBi.

I need to let the user to filter fields using slider, and send the value to the python script to run.

But the script is quite complicated which it need to access and refer the pkl files in folder and I'm not sure that the python visual can support this kind of script or not.

I am new in both python and powerbi, need somebody's help to find a good solution on this issue and below is the original python script I need to run. Thanks a lot.

 
import l1_alg_module
import pandas as pd
dret_info, df_res, json_res = l1_alg_module.get_shapley(input_data_file="D:/pythonWorks/whatif/city_daily.csv",
obj_id_col='city',
time_id_col='calendar_date',
model_file_path="D:/pythonWorks/whatif/new_city_l1/models/", =>pkl files
test_obj_name="KOTA MEDAN", => According value selected in slider
start_window_date="20220801", => According value selected in slider
end_window_date="20220901", => According value selected in slider
window_size=7, => According value selected in slider
ret_output_path="D:/pythonWorks/whatif/"
print (df_res)
0 REPLIES 0

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.