I've been using Python for years and I'm totally new to Power BI, I don't think I can do what I wanted in Power BI, but I watched the whole of the video anyway because it's such a well done video! Also, as Python-fan, watching your enthusiasm made the video even better
@ankit_real2 жыл бұрын
How much package do you get??
@CarlosHernandez-dh7zn3 жыл бұрын
The video in 6:11 set "matplotlib.pyplot as lib" and launch "pit.show". That's an error. The right code is: (after install pandas and anaconda) import seaborn as sns import matplotlib.pyplot as pit sns.swarmplot(x="day", y="total_bill", data=dataset) pit.show()
@santoshf3 жыл бұрын
It's should be lib.show()
@helloimsnow77602 жыл бұрын
@@santoshf thank you
@zhiyingwang12347 ай бұрын
Thanks a lot!
@rokaskrisciunas60154 ай бұрын
Thanks ;)
@tomasdale53062 жыл бұрын
I HAVE NEVER SEEN SOMEONE WITH SO MUCH ENERGY TEACHING !!!!
@lespinoz3 жыл бұрын
Wow...!!! How simple to implement Python you just showed here! Congrats and thank you for sharing! Aside from that, I liked the way you edited your video; audio, zooms, highlighting, story flow... just amazing!
@willcisler70693 жыл бұрын
I love the R and Python integration in power query but, for me, the personal gateway is the deal breaker. We have an enterprise gateway but that doesn't work. I could install the personal gateway on the same machine but now I have two gateways to update and configure.. :( Is it worth stating that the gateway isn't required for the visualisations as along as you use the support packages.
@markmathieu86483 жыл бұрын
Will, absolutely. I was let down alot early on in my PowerBI journey when I'd go to implement python outside of visualizations and just get crushed by the lack of support in enterprise gateway.
@ssudarshan753 жыл бұрын
Quite funny! Just before the video started, the first thing i did was to scroll down hoping that we dont need a personal gateway and here's the comment. This is a deal breaker
@ThoughT733 жыл бұрын
Same here. Total deal breaker.
@daviddossantos56293 жыл бұрын
Looks cool but no even going to try because it's not efficient the way to get the data, we use live connection (SSAS).
@ducminh75683 жыл бұрын
wait can we just upload the script on OneDrive and then use it ?
@alicedwonderland77333 жыл бұрын
Thank you, Patrick! I'm toying with the idea of starting with Python, and I love Power BI, hence I need to mix them. You rock!
@JR-ly6bx3 жыл бұрын
probably the best tutorial on youtube ive ever seen, awesome job
@simon123cup3 жыл бұрын
Patrick is a legend.
@paulj6253 жыл бұрын
Damn right boy!!!
@LuisRomaUSA3 жыл бұрын
Python visuals are very slow once the report is published, to slow to be actually used in a report. To my understanding, this is because the script has to be sent back to an azure host that recalculates the visual each time you change it. I try avoiding python visuals in power bi for this reason
@sharkam693 жыл бұрын
The only way that your report is not slow is an empty report
@thefamousdjx2 жыл бұрын
Good info
@paulnandes28413 жыл бұрын
Python for REGEX to validate data quality of a database and then Power Automate to email the users inpuiting bad quality data so they can fix.
@FaaBioo9723 жыл бұрын
Great use case 👍🏾
@CloudandZack1st2 жыл бұрын
Just a friendly heads up: If you add python to your environment variables at the end of the installation (or the beginning depending on which version of Python you install), you can invoke pip without pointing to the directory. 😃
@CloudandZack1st Жыл бұрын
@@jamesbyrnes8286 Yes, you can manually add the path to your environment variables either through cmd or through searching environment variables in the start menu.
@josez254411 ай бұрын
That's how you really teach something, rigth in the moment you are learning it yourself. Thanks
@mimibyrd5403 Жыл бұрын
This video was excellent and allowed me to get started with Python in my Power BI report.
@alencaru3 жыл бұрын
I use a lot R and Python in Power BI but the problem is not being able to take an input from the user and apply it to a model and then give back an output as (chart, table, list etc.) if it would possible to send information to Python and R it would be a big big game change especially to use NLP capabilities from both of languages.
@ak_shavar10 ай бұрын
Hi, I’m wondering if this is still the case as at Jan 2024. I’m looking to do something similar of taking user input and apply it to a model.
@jhewitthunt3 жыл бұрын
Perfect starter video for a total amateur like me! Thanks Patrick
@Embargo272 жыл бұрын
This was phenomenal, bro u just made my life a lot easier
@AAzert423 жыл бұрын
Nice, thanks for this video ! Hope to have more video about Python integration in Power Bi in future videos
@sofyan4713 жыл бұрын
Interaction is a problem with python. Some other visualisation tool has much better integration. Python is great but for visual we can't do interaction from python visual to other part of report
@Abhishekjain073 жыл бұрын
Absolutely it's a great challenge. As a python lover I am dying to use python visuals in Power BI and just because of this interactive limitation I am not able to. SAD. Very 😥
@DanielWeikert3 жыл бұрын
It works from a default viz to the python viz but not the other way round. But that is not the only issue. Currently there are too many limitations. By the way: what other viz tool? Have not seen any good integration so far
@VladMZ3 жыл бұрын
@@DanielWeikert If you know Javascript, you can build your own custom Visuals. Although the process is tedious and lengthy if you want a really good working visual. Use Charticulator to build your own visuals with little to no coding.
@VladMZ3 жыл бұрын
@@Abhishekjain07 I tried R too, and it has the very same issues. Sadly.
@LuisRomaUSA3 жыл бұрын
You could if power bi supported the right libraries, but power bi only lets you use libraries that do not provide interaction
@jayong23702 жыл бұрын
Great video. Just starting to explore using Python with Power BI. Interesting to see how the performance of the python queries stack up against DAX.
@followrajah77438 ай бұрын
Patrick thank you for this. Just yesterday I wanted to use Python in Power BI but had no idea where to start.
@Darksirius1553 жыл бұрын
Please more Video like this, always amazing videos.
@mbulelolomo88983 жыл бұрын
Thank you for this Patrick, I am actually starting with learning python. Great video you have right there!
@stouttravis3 жыл бұрын
I know an intermediate level of python, but have never looked into what's supported in Power BI. Seeing Patrick get something built so easily without evening knowing python was exciting as it shows the integration must be pretty well designed. I'm excited to go through and learn the limitations for myself.
@ducminh75683 жыл бұрын
nah too bad it not that good with powerbi
@thefamousdjx2 жыл бұрын
@@ducminh7568 why isnt it good? I found that with complex nested json, powerbi creates all these nested record and list objects and I have to go in and flatten them myself, unless I'm missing something as I just started using it. But with the python script the output comes out already flattened out
@ducminh75682 жыл бұрын
@@thefamousdjx so it not that great because you cannot load Python code online via SharePoint but it has to be from your computer so that you cannot automate tasks with PowerBi services but desktop only.
@yukithejapanese3 жыл бұрын
I've already use Python integration for some of my freelance work and it's great!
@WAIT4GOD Жыл бұрын
Awesome, thanks for taking the time to do this!
@Anthony_Lecoq3 жыл бұрын
Awesome Patrick ;) I was thinking to test python in PBI since a while. This video made me started... I though it would be a bit complicated, but I am astonished by the simplicity to implement it. Time invested versus the quality and powerfulness of charts. It is definitely worth it. And using data=dataset ... BAM we get the interactivity between charts... For the moment I do not use any service so no issue with the Gateway... I feel I will find out some great usage of python in PBI ;) Patrick you are amazing ! Merci
@n0rice4u392 жыл бұрын
Hey Patrick, not sure if this is mentioned but in the command line you dont have to put the full directory of python, just "python -m pip install.." is good enough
@rohandhande93913 жыл бұрын
This guy's are amazing why Microsoft not seen this channel .
@Noel723173 жыл бұрын
Hello patrick, I from Nicaragua and don't speak english but this video have subtitle in spanish, so great .. thank you for that could you continue placing the subtitles?
@leybourne3 жыл бұрын
Amazing presentation as usual. Thank you, Patrick! Python and R integration is good. However, there are too many limitations for using Python and R scripts in Power BI which Patrick did not mention (vide documentation). When we want to get data from a data source that is directly not supported in Power BI (quite rare nowadays!), an R/Python script may help. I remember Adam had a video on creating data connectors with C# as well (long time ago). We can do certain transformations that are beyond the capacity of M using R/Python scripting. What we need is a scripting language for Power BI that is comparable to VBA in Excel, a language that is truly incorporated, not superficially attached. R and Python script support in Power BI is still just sensational than truly useful. Let’s see how it develops in the due course. Definitely Interesting, but I doubt if it would be equally useful. Of course, it’s only my opinion as a user of Power BI. There are experts on the subject who think otherwise.
@matthiask46023 жыл бұрын
don´t wish more scripting languages, python has to do the job. It should become the new VBA. (please!! I do not want to learn another language!!!)
@leybourne3 жыл бұрын
@@matthiask4602 Neither do I! LOL! C# and R are good enough for MSBI! What I meant was that the scripting language - be it Python, R or whatever -should be well incorporated into and supported by Power BI. Right now, there are ridiculous limitations.
@MattWhiteMattWPBS3 жыл бұрын
You're going to be the person blamed when Microsoft shoehorns VBA into PowerBI...!
@navjotsingh22512 жыл бұрын
@@leybourne I think python would be better, it would be difficult to use R as we use vba imo. Python fits nicely as a scripting language that will feel like vba for power bi.
@JHatLpool Жыл бұрын
Can you not perform your transformations using DAX (which is similar to VBA) ?
@atarunraj3 жыл бұрын
Yup. Have used Python to extract data from Oracle ERP Cloud to use with Power BI. Never did the visualization though, so that was good to see. 👍
@NayankaGothane3 жыл бұрын
When we work on R and Python visual, it kinda takes lot of load on pbix file. How to optimize the same?
@swagatkumarsrivastava23223 жыл бұрын
Really looking forward to receive some more important lessons on Python in Power BI.
@klaymoon1 Жыл бұрын
Great video! Can I ask you what is Personal Gateway? Is it something download and install or subscribe to? Thanks.
@davida6146 Жыл бұрын
It's weird because I followed your exact steps but I kept getting an error for my columns not being defined... I then got am error for the "pit.show()" not being defined. I tweaked it a bit and this code ended up working for me: # The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script: #dataset = pandas.DataFrame(day, total_bill) #dataset = dataset.drop_duplicates() # Paste or type your script code here: import seaborn as sns import matplotlib.pyplot as lib sns.swarmplot(data=dataset, x="day", y="total_bill") lib.show()
@SebasAvello3 жыл бұрын
I need help, when I try to show it with pit.show() appears this: ;NameError: name 'pit' is not defined
@happyhotify2 ай бұрын
lib.show()
@xinchunhe39603 жыл бұрын
What do you mean personal gateway? if i share my dashboard with other who doesn't have python install, will they see a error on their side?
@jankruit6089 Жыл бұрын
Liked your video! I am A Python and Power BI Teacher: Very good as a start!
@reggieoverton1213 жыл бұрын
As a python user myself I cringed at your code but was excited to see python work. Great work
@ArmandoReportes3 жыл бұрын
Another reason to learn python. Thanks.
@endless_puns3 жыл бұрын
The integration between Power BI and R/Python is amazing for loading and processing data. I've created an automatic data workflow that creates tidy data files stored in the pickle format which I then import and use for visualizing the data. Some reports require further modifications to the already processed data and for those I've set things up so that Power BI calls the execution of a Python script stored in a custom folder that then does the additional data processing. Pretty neat! The exact same thing works with R, too.
@patrickkeating53293 жыл бұрын
Would love to see a video of this.
@rishabhagarwal47023 жыл бұрын
Hi, how do you make power BI call a python script stored in a folder? Don't you have to paste the Python code in the power bi itself?
@chinenyenwaneri61633 жыл бұрын
Would love to see a video of this too
@endless_puns3 жыл бұрын
@@rishabhagarwal4702 It's actually fairly straight-forward. Go to the Power Query editor and create a new query by using "Python script" as the source. Then, type in the following command: exec(open("C:/Users/User/Desktop/Script.py", encoding = "utf-8").read()) Then replace the folder and script names with your own and make sure to specify the encoding of your *.PY file. When you press enter, Power BI will start executing the script and then a pop-up window will appear where you will be able to choose one or several pandas data frames and load them into your model.
@francisopiyo233222 күн бұрын
Nice one. Can the refresh happen on standard gateway or it has to be a personal gateway
@josephdaquila24795 ай бұрын
Do you think this would be effective at defining custom logic for bringing in data? Like having to loop through the dataframe to determine its structure? and returning that dataset? stuff that you cant do just through applying transformations & such...
@saketsrivastava842 жыл бұрын
Brilliantly explained
@tarun0073 жыл бұрын
Thanks Patrick. This was a good start.
@andresmachad3 жыл бұрын
heyy guy, how can i put it on powerbi services? because it don't work there
@xxczerxx2 жыл бұрын
This is really neat. I was wondering if you could use Python in Power Query at the "source" level to handle folders that have constantly updating information (eg files that have current date in their name)? Does this eat into memory usage or is it still "technically" operating within Python (ie outside M)? I had this problem previously -- a folder on SharePoint that had files being continuously added. I couldn't figure out a way for the Query to update dynamically. So I couldn't figure out a simple logic in M to simply say ("import everything in this folder with string containing 'xxx' "). However, after watching this vid it seems you could simply write a simple Python script to handle that batch import with necessary logic.
@jedidiaholadele20862 жыл бұрын
Loved this!! Watching him alias matplotlib as lib was quite funny though 😂
@SK-ck3qb3 жыл бұрын
How can I use this with Analysis Services in an emedded app? Thanks!
@matthiask46023 жыл бұрын
Good "Intro". Makes one eager to learn more about python in Power BI . But more content on top of this is to be expected now. :-)
@jasons67213 жыл бұрын
Appreciate you posting this info! Very informative and something I was looking for. However, I've been trying to figure out the compelling use case to use python. So far, I can do everything that I've need with OOB connectors, dax and mquery. But, I've seen that doing some development using Python (specifically in Jupyter Notebook) is much quicker because you only deal with a small subset of data instead of loading the entire data set. In some cases, where data load time becomes an issue, i just set parameters to only load recent files or a # of records... Then, let data refresh do the heavy lifting after publishing.
@SpiritOfIndiaaa7 ай бұрын
thanks a lot , where from the data set of "tips" came from ?
@jsorrisone3 жыл бұрын
bro man bro.....you are legit the most solid doo in the cuooo
@luishernando3 жыл бұрын
Thanks a lot Patrick! Smooth and very useful orientation! Python and PB! awesome! The best of all the world
@JHatLpool2 жыл бұрын
A really useful guide.
@szklydm3 жыл бұрын
Just out of curiosity, how long did it take you to figure all this stuff out? 🙂 Great to see the "masters" struggle a bit, which is an inevitable part of the learning curve. Thanks for this Patrick!
@VladMZ3 жыл бұрын
And I was just about to try Python for more advanced analytics in building a dataset. "Only Personal Gateway" is a big showstopper. Makes no sense. Also however cool Python or R visuals, they are just pictures - no tooltip, no interactivity :(
@xtiandyc70342 жыл бұрын
Hi Patrick! I'm planning to learn power bi right now. can you give me the link from your videos where I can start with? You got tons of videos and I don't know what video to start with. Thanks!
@aswinshukla5762 Жыл бұрын
Any idea if we can use python in PBI Q&A feature ? I want to enhance the Q&A feature by adding some NLP api's.
@richasugandhi29549 ай бұрын
Hello, I got an error when loading the 'tips' dataset. So, In which folder should the tips file be
@goldensleeves2 жыл бұрын
Great video. What is a personal gateway??? Also, I am surprised it’s such a short list of supported python packages… I wish plotly was supported for example!
@36DENSE36 Жыл бұрын
Are there any plans to also make Python available for the standard mode of the power bi gateway (so not the personal mode)?
@CyrilGagnaire3 жыл бұрын
Hoooo, I need to try that! Thanks Patrick
@jimmytao25053 жыл бұрын
Amazing, how could you make the blue square move along with your mouse in your video?
@DavidSanchez-vr1ny2 жыл бұрын
This was pretty cool!
@AmitRoy-om3tp3 жыл бұрын
This is great! I will try this out.
@abimaeldominguez41262 жыл бұрын
Hello, thanks for the video. I have a question, I was wondering if this Python scripting would work when I upload my dashboard to the cloud and update it using a gateway to refresh the data sources periodically?
@livingwithcatz Жыл бұрын
It seems like several details were left out on the installation (adding to PATH, including PIP... matplotlib, pandas) I had to reference another video because my installation didn't work just by watching this. I'm just a beginner, so maybe it wasn't intended for people with no prior knowledge.
@IsraelGonzález-y5x Жыл бұрын
Nice video: by any chance you know how to upload my dashboard with python visuals into a website? When I upload the dashboard, everything can be seen except these python visuals.
@davey16442 жыл бұрын
Slick - Thanks Patrick !!
@AlejandraRamirez-vj3vf10 ай бұрын
how to read an excel file stored in a sharepoint with python in power bi? Without explicitly giving password and user or from an organizational account?
@kabukidanshi78742 жыл бұрын
Nice video! I have a question. If I send a dashboard with a python script to someone that doesn't have python installed, will it run? Thanks!
@user-sj9xq6hb9p3 жыл бұрын
We need a full series
@ucthangnong563112 күн бұрын
in python script to visualize, "Duplicate rows will be removed from the data". How can I disable it? :
@tadsaitsaac75473 жыл бұрын
we can do manipulations on the table we impprt to data query with python?
@ahv54578 ай бұрын
When I publish it online, I cannot set up the schedule refresh. Any solution?
@santoshadhikari9933 Жыл бұрын
How can we loop through Report object eg: slicer to export the report as PDF file using python script?
@VashLoot10 ай бұрын
Will Python script work if the PowerBI is located in Sharepoint. I mean, do other users, that can see my interface not see the visuals because they don't have python downloaded?
@marcoantoniobajanabarahona33003 жыл бұрын
You could make a video of how to use powerquery and phyton for some data transformation
@darkmatter53109 ай бұрын
How can I switch parameters for the Python API call script from Power BI user interface.
@CaribouDataScience8 ай бұрын
Thanks
@soumaisti40853 жыл бұрын
Hi man, I got the examples but I'm a little confused because the Python language in Power Bi is just to plot some libraries or graphs? What are the real advantages related to Power BI? For example, I can download more visuals instead of implement using the R language? Tks
@rauljimenez5485 Жыл бұрын
Is it possible to refresh a Python source in the Service?
@vennelaneethipudi4573 Жыл бұрын
I have a requirement where I have to get values from 17 different worksheets of a excel file, so I wrote a python script that goes to each sheet and gets this single value and creates a dataframe. Now I am using this script in Power BI to get the dataframe into my model. But when I am trying to schedule a refresh it says the datasource is not supported. Is there any workaround or solution to this? Please help me out.
@shubhrabhowmik7 ай бұрын
how can I fetch data from sharepoint or web api and connect it here in power bi using python?
@benhalicki97493 жыл бұрын
Use of personal gateway... does this mean all users have to have the personal gateway installed to be able to access a published report using python?
@elrevesyelderecho3 жыл бұрын
Thanks. Good intro to the subject!
@ins-ight3 жыл бұрын
Hi Patrick, can we perform Text Analytics using Python visual in Power BI? If our data is based out of SSAS so we won't be able to use Text Analytics as we won't have Query Editor in Power BI then due to Analysis Server based data source.
@aymanalafifi3 жыл бұрын
Can you include a parameter inside your python script? I'm thinking if you have some code to read a file and clean your data for powerbi, it would be nice to define the file path as a parameter so the user can recycle and reuse your dashboard and code for other files
@MeghaviThakar8 ай бұрын
Hey, great video but what if I want to take input from the user and use that in the Python code and give an output how can one do that?
@PRIYANKAPATEL-x1s Жыл бұрын
Apart from personal gateway to refresh the report, any other way or workaround to do it. Personal gateway is a very big limitation
@pjevans7933 жыл бұрын
Great stuff man... Would love to see some videos over the GenerateEmbedTokenV2 changes and what new functionality comes with the newer embed token model. Really the main updates with the move to V2.
@paulinedahne Жыл бұрын
I am trying to uncompressed a column in a dataset using pandas and lzstring. I have used this syntax but the Python script errors with TypeError: 'function' object is not subscriptable # 'dataset' holds the input data for this script import pandas as pd import lzstring as lz df = pd.DataFrame(dataset) df['DecompreseedAssets'] = lz._decompress['MigratedAssets'] MigratedAssets column has data that is compressed using lzstring Could you help please?
@debrasimpson4986 Жыл бұрын
Would it be an accurate statement to say using Python in PBI is faster than using Power Query M? I'm trying to find this online but haven't really seen anything confirming this and figure I'll ask on my favorite channel. ;)
@ShabnamKhan-vk7fj3 жыл бұрын
You rock! thanks for the quick demo. I love it
@klamentyne59912 жыл бұрын
More of the python in power bi please!
@samiraslan97353 жыл бұрын
Patrick can teach you the whole thing about black holes in 5 minutes at your first grade 😁 love that Powerbi support R and Paython but personal gateway is a big no.
@sabasoleimangoli19503 жыл бұрын
I have an error: python visuals are currently disable in your organization!!!! so, is python scripts only visible on the Microsoft cloud? and don't visible on the report server?