- Getting started with python scripting in Power BI: Getting Started with Python Scripting in Power BI | Power BI Training Australia
- Understanding Data manipulation with python script: Data Manipulation using Python Scripts | Power BI Training Australia
- Select Visualization Tab under the Visualizations Pane
2. Click on Python Visual. The following window will appear.
3. Click on Enable to enable Python Scripts. The following window will appear.
Python script editor automatically creates the dataset using the library Pandas. It creates the data frame with required column fields.
4. Now to start scripting, drag and drop fields into the Visualizations pane. Or you may also check the checkboxes for adding them into the script editor.
Creating a Box Plot
A Boxplot gives a summary of your data. It depicts if your data is symmetrical and highlights the outliers. It also indicates how your data is distributed in the dataset.
1. In the editor, write the Python code as shown below to draw a box plot.
We will be using pre built library functions from matplotlib.pyplot. Matplotlib.pyplot is drawing a line graph of all the four dimensions independently.
2. Now, run script by clicking at play button at the top right corner of the screen.
In the box plot, all four dimensions (i.e the sepal width, petal width, sepal length, petal length) are examined independently. It indicates how values in each dimension are spread out. For example, let’s explain the sepal width dimension. The visual indicates that the min value is 2 and the max is 4.4. 25% of data is lower than 2.8 and 75% is above 2.8.
3. The plot of the dataset will be generated accordingly.
Box plot is one of the most recommended visuals for exploratory data analysis. It is also known as box and whisker plot and displays the data distribution using the data quartiles. Box plot can be created in Power BI using some python libraries such as Matplotlib and Pyplot. This blog posts presents a step-by-step guide to creating a box plot in Power BI desktop using python.
More Checkouts for Power BI Training in Australia.